!function (t, e) {
    "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e(t.echarts = {})
}(this, function (t) {
    "use strict";

    function e(t) {
        var e = {}, i = {}, n = t.match(/Firefox\/([\d.]+)/),
            r = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/), a = t.match(/Edge\/([\d.]+)/),
            o = /micromessenger/i.test(t);
        return n && (i.firefox = !0, i.version = n[1]), r && (i.ie = !0, i.version = r[1]), a && (i.edge = !0, i.version = a[1]), o && (i.weChat = !0), {
            browser: i,
            os: e,
            node: !1,
            canvasSupported: !!document.createElement("canvas").getContext,
            svgSupported: "undefined" != typeof SVGRect,
            touchEventsSupported: "ontouchstart" in window && !i.ie && !i.edge,
            pointerEventsSupported: "onpointerdown" in window && (i.edge || i.ie && i.version >= 11),
            domSupported: "undefined" != typeof document
        }
    }

    function i(t, e) {
        "createCanvas" === t && (ng = null), eg[t] = e
    }

    function n(t) {
        if (null == t || "object" != typeof t) return t;
        var e = t, i = jp.call(t);
        if ("[object Array]" === i) {
            if (!E(t)) {
                e = [];
                for (var r = 0, a = t.length; a > r; r++) e[r] = n(t[r])
            }
        } else if (qp[i]) {
            if (!E(t)) {
                var o = t.constructor;
                if (t.constructor.from) e = o.from(t); else {
                    e = new o(t.length);
                    for (var r = 0, a = t.length; a > r; r++) e[r] = n(t[r])
                }
            }
        } else if (!Yp[i] && !E(t) && !C(t)) {
            e = {};
            for (var s in t) t.hasOwnProperty(s) && (e[s] = n(t[s]))
        }
        return e
    }

    function r(t, e, i) {
        if (!S(e) || !S(t)) return i ? n(e) : t;
        for (var a in e) if (e.hasOwnProperty(a)) {
            var o = t[a], s = e[a];
            !S(s) || !S(o) || _(s) || _(o) || C(s) || C(o) || M(s) || M(o) || E(s) || E(o) ? !i && a in t || (t[a] = n(e[a], !0)) : r(o, s, i)
        }
        return t
    }

    function a(t, e) {
        for (var i = t[0], n = 1, a = t.length; a > n; n++) i = r(i, t[n], e);
        return i
    }

    function o(t, e) {
        for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
        return t
    }

    function s(t, e, i) {
        for (var n in e) e.hasOwnProperty(n) && (i ? null != e[n] : null == t[n]) && (t[n] = e[n]);
        return t
    }

    function l() {
        return ng || (ng = ig().getContext("2d")), ng
    }

    function u(t, e) {
        if (t) {
            if (t.indexOf) return t.indexOf(e);
            for (var i = 0, n = t.length; n > i; i++) if (t[i] === e) return i
        }
        return -1
    }

    function h(t, e) {
        function i() {
        }

        var n = t.prototype;
        i.prototype = e.prototype, t.prototype = new i;
        for (var r in n) n.hasOwnProperty(r) && (t.prototype[r] = n[r]);
        t.prototype.constructor = t, t.superClass = e
    }

    function c(t, e, i) {
        t = "prototype" in t ? t.prototype : t, e = "prototype" in e ? e.prototype : e, s(t, e, i)
    }

    function d(t) {
        return t ? "string" == typeof t ? !1 : "number" == typeof t.length : void 0
    }

    function f(t, e, i) {
        if (t && e) if (t.forEach && t.forEach === Kp) t.forEach(e, i); else if (t.length === +t.length) for (var n = 0, r = t.length; r > n; n++) e.call(i, t[n], n, t); else for (var a in t) t.hasOwnProperty(a) && e.call(i, t[a], a, t)
    }

    function p(t, e, i) {
        if (t && e) {
            if (t.map && t.map === Jp) return t.map(e, i);
            for (var n = [], r = 0, a = t.length; a > r; r++) n.push(e.call(i, t[r], r, t));
            return n
        }
    }

    function g(t, e, i, n) {
        if (t && e) {
            if (t.reduce && t.reduce === tg) return t.reduce(e, i, n);
            for (var r = 0, a = t.length; a > r; r++) i = e.call(n, i, t[r], r, t);
            return i
        }
    }

    function m(t, e, i) {
        if (t && e) {
            if (t.filter && t.filter === $p) return t.filter(e, i);
            for (var n = [], r = 0, a = t.length; a > r; r++) e.call(i, t[r], r, t) && n.push(t[r]);
            return n
        }
    }

    function v(t, e, i) {
        if (t && e) for (var n = 0, r = t.length; r > n; n++) if (e.call(i, t[n], n, t)) return t[n]
    }

    function y(t, e) {
        var i = Qp.call(arguments, 2);
        return function () {
            return t.apply(e, i.concat(Qp.call(arguments)))
        }
    }

    function x(t) {
        var e = Qp.call(arguments, 1);
        return function () {
            return t.apply(this, e.concat(Qp.call(arguments)))
        }
    }

    function _(t) {
        return "[object Array]" === jp.call(t)
    }

    function w(t) {
        return "function" == typeof t
    }

    function b(t) {
        return "[object String]" === jp.call(t)
    }

    function S(t) {
        var e = typeof t;
        return "function" === e || !!t && "object" === e
    }

    function M(t) {
        return !!Yp[jp.call(t)]
    }

    function I(t) {
        return !!qp[jp.call(t)]
    }

    function C(t) {
        return "object" == typeof t && "number" == typeof t.nodeType && "object" == typeof t.ownerDocument
    }

    function T(t) {
        return t !== t
    }

    function D() {
        for (var t = 0, e = arguments.length; e > t; t++) if (null != arguments[t]) return arguments[t]
    }

    function A(t, e) {
        return null != t ? t : e
    }

    function k(t, e, i) {
        return null != t ? t : null != e ? e : i
    }

    function P() {
        return Function.call.apply(Qp, arguments)
    }

    function L(t) {
        if ("number" == typeof t) return [t, t, t, t];
        var e = t.length;
        return 2 === e ? [t[0], t[1], t[0], t[1]] : 3 === e ? [t[0], t[1], t[2], t[1]] : t
    }

    function O(t, e) {
        if (!t) throw new Error(e)
    }

    function z(t) {
        return null == t ? null : "function" == typeof t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "")
    }

    function B(t) {
        t[rg] = !0
    }

    function E(t) {
        return t[rg]
    }

    function N(t) {
        function e(t, e) {
            i ? n.set(t, e) : n.set(e, t)
        }

        var i = _(t);
        this.data = {};
        var n = this;
        t instanceof N ? t.each(e) : t && f(t, e)
    }

    function R(t) {
        return new N(t)
    }

    function F(t, e) {
        for (var i = new t.constructor(t.length + e.length), n = 0; n < t.length; n++) i[n] = t[n];
        var r = t.length;
        for (n = 0; n < e.length; n++) i[n + r] = e[n];
        return i
    }

    function V() {
    }

    function G(t, e) {
        var i = new og(2);
        return null == t && (t = 0), null == e && (e = 0), i[0] = t, i[1] = e, i
    }

    function H(t, e) {
        return t[0] = e[0], t[1] = e[1], t
    }

    function W(t) {
        var e = new og(2);
        return e[0] = t[0], e[1] = t[1], e
    }

    function X(t, e, i) {
        return t[0] = e, t[1] = i, t
    }

    function U(t, e, i) {
        return t[0] = e[0] + i[0], t[1] = e[1] + i[1], t
    }

    function Y(t, e, i, n) {
        return t[0] = e[0] + i[0] * n, t[1] = e[1] + i[1] * n, t
    }

    function q(t, e, i) {
        return t[0] = e[0] - i[0], t[1] = e[1] - i[1], t
    }

    function j(t) {
        return Math.sqrt(Z(t))
    }

    function Z(t) {
        return t[0] * t[0] + t[1] * t[1]
    }

    function K(t, e, i) {
        return t[0] = e[0] * i[0], t[1] = e[1] * i[1], t
    }

    function $(t, e, i) {
        return t[0] = e[0] / i[0], t[1] = e[1] / i[1], t
    }

    function Q(t, e) {
        return t[0] * e[0] + t[1] * e[1]
    }

    function J(t, e, i) {
        return t[0] = e[0] * i, t[1] = e[1] * i, t
    }

    function te(t, e) {
        var i = j(e);
        return 0 === i ? (t[0] = 0, t[1] = 0) : (t[0] = e[0] / i, t[1] = e[1] / i), t
    }

    function ee(t, e) {
        return Math.sqrt((t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1]))
    }

    function ie(t, e) {
        return (t[0] - e[0]) * (t[0] - e[0]) + (t[1] - e[1]) * (t[1] - e[1])
    }

    function ne(t, e) {
        return t[0] = -e[0], t[1] = -e[1], t
    }

    function re(t, e, i, n) {
        return t[0] = e[0] + n * (i[0] - e[0]), t[1] = e[1] + n * (i[1] - e[1]), t
    }

    function ae(t, e, i) {
        var n = e[0], r = e[1];
        return t[0] = i[0] * n + i[2] * r + i[4], t[1] = i[1] * n + i[3] * r + i[5], t
    }

    function oe(t, e, i) {
        return t[0] = Math.min(e[0], i[0]), t[1] = Math.min(e[1], i[1]), t
    }

    function se(t, e, i) {
        return t[0] = Math.max(e[0], i[0]), t[1] = Math.max(e[1], i[1]), t
    }

    function le() {
        this.on("mousedown", this._dragStart, this), this.on("mousemove", this._drag, this), this.on("mouseup", this._dragEnd, this)
    }

    function ue(t, e) {
        return {target: t, topTarget: e && e.topTarget}
    }

    function he(t, e) {
        var i = t._$eventProcessor;
        return null != e && i && i.normalizeQuery && (e = i.normalizeQuery(e)), e
    }

    function ce(t, e, i, n, r, a) {
        var o = t._$handlers;
        if ("function" == typeof i && (r = n, n = i, i = null), !n || !e) return t;
        i = he(t, i), o[e] || (o[e] = []);
        for (var s = 0; s < o[e].length; s++) if (o[e][s].h === n) return t;
        var l = {h: n, one: a, query: i, ctx: r || t, callAtLast: n.zrEventfulCallAtLast}, u = o[e].length - 1,
            h = o[e][u];
        return h && h.callAtLast ? o[e].splice(u, 0, l) : o[e].push(l), t
    }

    function de(t, e, i, n, r, a) {
        var o = n + "-" + r, s = t.length;
        if (a.hasOwnProperty(o)) return a[o];
        if (1 === e) {
            var l = Math.round(Math.log((1 << s) - 1 & ~r) / pg);
            return t[i][l]
        }
        for (var u = n | 1 << i, h = i + 1; n & 1 << h;) h++;
        for (var c = 0, d = 0, f = 0; s > d; d++) {
            var p = 1 << d;
            p & r || (c += (f % 2 ? -1 : 1) * t[i][d] * de(t, e - 1, h, u, r | p, a), f++)
        }
        return a[o] = c, c
    }

    function fe(t, e) {
        var i = [[t[0], t[1], 1, 0, 0, 0, -e[0] * t[0], -e[0] * t[1]], [0, 0, 0, t[0], t[1], 1, -e[1] * t[0], -e[1] * t[1]], [t[2], t[3], 1, 0, 0, 0, -e[2] * t[2], -e[2] * t[3]], [0, 0, 0, t[2], t[3], 1, -e[3] * t[2], -e[3] * t[3]], [t[4], t[5], 1, 0, 0, 0, -e[4] * t[4], -e[4] * t[5]], [0, 0, 0, t[4], t[5], 1, -e[5] * t[4], -e[5] * t[5]], [t[6], t[7], 1, 0, 0, 0, -e[6] * t[6], -e[6] * t[7]], [0, 0, 0, t[6], t[7], 1, -e[7] * t[6], -e[7] * t[7]]],
            n = {}, r = de(i, 8, 0, 0, 0, n);
        if (0 !== r) {
            for (var a = [], o = 0; 8 > o; o++) for (var s = 0; 8 > s; s++) null == a[s] && (a[s] = 0), a[s] += ((o + s) % 2 ? -1 : 1) * de(i, 7, 0 === o ? 1 : 0, 1 << o, 1 << s, n) / r * e[o];
            return function (t, e, i) {
                var n = e * a[6] + i * a[7] + 1;
                t[0] = (e * a[0] + i * a[1] + a[2]) / n, t[1] = (e * a[3] + i * a[4] + a[5]) / n
            }
        }
    }

    function pe(t, e, i, n, r) {
        return ge(mg, e, n, r, !0) && ge(t, i, mg[0], mg[1])
    }

    function ge(t, e, i, n, r) {
        if (e.getBoundingClientRect && Up.domSupported && !ye(e)) {
            var a = e[gg] || (e[gg] = {}), o = me(e, a), s = ve(o, a, r);
            if (s) return s(t, i, n), !0
        }
        return !1
    }

    function me(t, e) {
        var i = e.markers;
        if (i) return i;
        i = e.markers = [];
        for (var n = ["left", "right"], r = ["top", "bottom"], a = 0; 4 > a; a++) {
            var o = document.createElement("div"), s = o.style, l = a % 2, u = (a >> 1) % 2;
            s.cssText = ["position: absolute", "visibility: hidden", "padding: 0", "margin: 0", "border-width: 0", "user-select: none", "width:0", "height:0", n[l] + ":0", r[u] + ":0", n[1 - l] + ":auto", r[1 - u] + ":auto", ""].join("!important;"), t.appendChild(o), i.push(o)
        }
        return i
    }

    function ve(t, e, i) {
        for (var n = i ? "invTrans" : "trans", r = e[n], a = e.srcCoords, o = !0, s = [], l = [], u = 0; 4 > u; u++) {
            var h = t[u].getBoundingClientRect(), c = 2 * u, d = h.left, f = h.top;
            s.push(d, f), o = o && a && d === a[c] && f === a[c + 1], l.push(t[u].offsetLeft, t[u].offsetTop)
        }
        return o && r ? r : (e.srcCoords = s, e[n] = i ? fe(l, s) : fe(s, l))
    }

    function ye(t) {
        return "CANVAS" === t.nodeName.toUpperCase()
    }

    function xe(t, e, i, n) {
        return i = i || {}, n || !Up.canvasSupported ? _e(t, e, i) : Up.browser.firefox && null != e.layerX && e.layerX !== e.offsetX ? (i.zrX = e.layerX, i.zrY = e.layerY) : null != e.offsetX ? (i.zrX = e.offsetX, i.zrY = e.offsetY) : _e(t, e, i), i
    }

    function _e(t, e, i) {
        if (Up.domSupported && t.getBoundingClientRect) {
            var n = e.clientX, r = e.clientY;
            if (ye(t)) {
                var a = t.getBoundingClientRect();
                return i.zrX = n - a.left, void (i.zrY = r - a.top)
            }
            if (ge(xg, t, n, r)) return i.zrX = xg[0], void (i.zrY = xg[1])
        }
        i.zrX = i.zrY = 0
    }

    function we(t) {
        return t || window.event
    }

    function be(t, e, i) {
        if (e = we(e), null != e.zrX) return e;
        var n = e.type, r = n && n.indexOf("touch") >= 0;
        if (r) {
            var a = "touchend" !== n ? e.targetTouches[0] : e.changedTouches[0];
            a && xe(t, a, e, i)
        } else xe(t, e, e, i), e.zrDelta = e.wheelDelta ? e.wheelDelta / 120 : -(e.detail || 0) / 3;
        var o = e.button;
        return null == e.which && void 0 !== o && yg.test(e.type) && (e.which = 1 & o ? 1 : 2 & o ? 3 : 4 & o ? 2 : 0), e
    }

    function Se(t, e, i, n) {
        vg ? t.addEventListener(e, i, n) : t.attachEvent("on" + e, i)
    }

    function Me(t, e, i, n) {
        vg ? t.removeEventListener(e, i, n) : t.detachEvent("on" + e, i)
    }

    function Ie(t) {
        var e = t[1][0] - t[0][0], i = t[1][1] - t[0][1];
        return Math.sqrt(e * e + i * i)
    }

    function Ce(t) {
        return [(t[0][0] + t[1][0]) / 2, (t[0][1] + t[1][1]) / 2]
    }

    function Te(t, e, i) {
        return {
            type: t,
            event: i,
            target: e.target,
            topTarget: e.topTarget,
            cancelBubble: !1,
            offsetX: i.zrX,
            offsetY: i.zrY,
            gestureEvent: i.gestureEvent,
            pinchX: i.pinchX,
            pinchY: i.pinchY,
            pinchScale: i.pinchScale,
            wheelDelta: i.zrDelta,
            zrByTouch: i.zrByTouch,
            which: i.which,
            stop: De
        }
    }

    function De() {
        _g(this.event)
    }

    function Ae() {
    }

    function ke(t, e, i) {
        if (t[t.rectHover ? "rectContain" : "contain"](e, i)) {
            for (var n, r = t; r;) {
                if (r.clipPath && !r.clipPath.contain(e, i)) return !1;
                r.silent && (n = !0), r = r.parent
            }
            return n ? Sg : !0
        }
        return !1
    }

    function Pe(t, e, i) {
        var n = t.painter;
        return 0 > e || e > n.getWidth() || 0 > i || i > n.getHeight()
    }

    function Le() {
        var t = new Cg(6);
        return Oe(t), t
    }

    function Oe(t) {
        return t[0] = 1, t[1] = 0, t[2] = 0, t[3] = 1, t[4] = 0, t[5] = 0, t
    }

    function ze(t, e) {
        return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4], t[5] = e[5], t
    }

    function Be(t, e, i) {
        var n = e[0] * i[0] + e[2] * i[1], r = e[1] * i[0] + e[3] * i[1], a = e[0] * i[2] + e[2] * i[3],
            o = e[1] * i[2] + e[3] * i[3], s = e[0] * i[4] + e[2] * i[5] + e[4], l = e[1] * i[4] + e[3] * i[5] + e[5];
        return t[0] = n, t[1] = r, t[2] = a, t[3] = o, t[4] = s, t[5] = l, t
    }

    function Ee(t, e, i) {
        return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t[4] = e[4] + i[0], t[5] = e[5] + i[1], t
    }

    function Ne(t, e, i) {
        var n = e[0], r = e[2], a = e[4], o = e[1], s = e[3], l = e[5], u = Math.sin(i), h = Math.cos(i);
        return t[0] = n * h + o * u, t[1] = -n * u + o * h, t[2] = r * h + s * u, t[3] = -r * u + h * s, t[4] = h * a + u * l, t[5] = h * l - u * a, t
    }

    function Re(t, e, i) {
        var n = i[0], r = i[1];
        return t[0] = e[0] * n, t[1] = e[1] * r, t[2] = e[2] * n, t[3] = e[3] * r, t[4] = e[4] * n, t[5] = e[5] * r, t
    }

    function Fe(t, e) {
        var i = e[0], n = e[2], r = e[4], a = e[1], o = e[3], s = e[5], l = i * o - a * n;
        return l ? (l = 1 / l, t[0] = o * l, t[1] = -a * l, t[2] = -n * l, t[3] = i * l, t[4] = (n * s - o * r) * l, t[5] = (a * r - i * s) * l, t) : null
    }

    function Ve(t) {
        var e = Le();
        return ze(e, t), e
    }

    function Ge(t) {
        return t > Ag || -Ag > t
    }

    function He(t) {
        this._target = t.target, this._life = t.life || 1e3, this._delay = t.delay || 0, this._initialized = !1, this.loop = null == t.loop ? !1 : t.loop, this.gap = t.gap || 0, this.easing = t.easing || "Linear", this.onframe = t.onframe, this.ondestroy = t.ondestroy, this.onrestart = t.onrestart, this._pausedTime = 0, this._paused = !1
    }

    function We(t) {
        return t = Math.round(t), 0 > t ? 0 : t > 255 ? 255 : t
    }

    function Xe(t) {
        return t = Math.round(t), 0 > t ? 0 : t > 360 ? 360 : t
    }

    function Ue(t) {
        return 0 > t ? 0 : t > 1 ? 1 : t
    }

    function Ye(t) {
        return We(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 * 255 : parseInt(t, 10))
    }

    function qe(t) {
        return Ue(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 : parseFloat(t))
    }

    function je(t, e, i) {
        return 0 > i ? i += 1 : i > 1 && (i -= 1), 1 > 6 * i ? t + (e - t) * i * 6 : 1 > 2 * i ? e : 2 > 3 * i ? t + (e - t) * (2 / 3 - i) * 6 : t
    }

    function Ze(t, e, i) {
        return t + (e - t) * i
    }

    function Ke(t, e, i, n, r) {
        return t[0] = e, t[1] = i, t[2] = n, t[3] = r, t
    }

    function $e(t, e) {
        return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t
    }

    function Qe(t, e) {
        Wg && $e(Wg, e), Wg = Hg.put(t, Wg || e.slice())
    }

    function Je(t, e) {
        if (t) {
            e = e || [];
            var i = Hg.get(t);
            if (i) return $e(e, i);
            t += "";
            var n = t.replace(/ /g, "").toLowerCase();
            if (n in Gg) return $e(e, Gg[n]), Qe(t, e), e;
            if ("#" !== n.charAt(0)) {
                var r = n.indexOf("("), a = n.indexOf(")");
                if (-1 !== r && a + 1 === n.length) {
                    var o = n.substr(0, r), s = n.substr(r + 1, a - (r + 1)).split(","), l = 1;
                    switch (o) {
                        case"rgba":
                            if (4 !== s.length) return void Ke(e, 0, 0, 0, 1);
                            l = qe(s.pop());
                        case"rgb":
                            return 3 !== s.length ? void Ke(e, 0, 0, 0, 1) : (Ke(e, Ye(s[0]), Ye(s[1]), Ye(s[2]), l), Qe(t, e), e);
                        case"hsla":
                            return 4 !== s.length ? void Ke(e, 0, 0, 0, 1) : (s[3] = qe(s[3]), ti(s, e), Qe(t, e), e);
                        case"hsl":
                            return 3 !== s.length ? void Ke(e, 0, 0, 0, 1) : (ti(s, e), Qe(t, e), e);
                        default:
                            return
                    }
                }
                Ke(e, 0, 0, 0, 1)
            } else {
                if (4 === n.length) {
                    var u = parseInt(n.substr(1), 16);
                    return u >= 0 && 4095 >= u ? (Ke(e, (3840 & u) >> 4 | (3840 & u) >> 8, 240 & u | (240 & u) >> 4, 15 & u | (15 & u) << 4, 1), Qe(t, e), e) : void Ke(e, 0, 0, 0, 1)
                }
                if (7 === n.length) {
                    var u = parseInt(n.substr(1), 16);
                    return u >= 0 && 16777215 >= u ? (Ke(e, (16711680 & u) >> 16, (65280 & u) >> 8, 255 & u, 1), Qe(t, e), e) : void Ke(e, 0, 0, 0, 1)
                }
            }
        }
    }

    function ti(t, e) {
        var i = (parseFloat(t[0]) % 360 + 360) % 360 / 360, n = qe(t[1]), r = qe(t[2]),
            a = .5 >= r ? r * (n + 1) : r + n - r * n, o = 2 * r - a;
        return e = e || [], Ke(e, We(255 * je(o, a, i + 1 / 3)), We(255 * je(o, a, i)), We(255 * je(o, a, i - 1 / 3)), 1), 4 === t.length && (e[3] = t[3]), e
    }

    function ei(t) {
        if (t) {
            var e, i, n = t[0] / 255, r = t[1] / 255, a = t[2] / 255, o = Math.min(n, r, a), s = Math.max(n, r, a),
                l = s - o, u = (s + o) / 2;
            if (0 === l) e = 0, i = 0; else {
                i = .5 > u ? l / (s + o) : l / (2 - s - o);
                var h = ((s - n) / 6 + l / 2) / l, c = ((s - r) / 6 + l / 2) / l, d = ((s - a) / 6 + l / 2) / l;
                n === s ? e = d - c : r === s ? e = 1 / 3 + h - d : a === s && (e = 2 / 3 + c - h), 0 > e && (e += 1), e > 1 && (e -= 1)
            }
            var f = [360 * e, i, u];
            return null != t[3] && f.push(t[3]), f
        }
    }

    function ii(t, e) {
        var i = Je(t);
        if (i) {
            for (var n = 0; 3 > n; n++) i[n] = 0 > e ? i[n] * (1 - e) | 0 : (255 - i[n]) * e + i[n] | 0, i[n] > 255 ? i[n] = 255 : t[n] < 0 && (i[n] = 0);
            return li(i, 4 === i.length ? "rgba" : "rgb")
        }
    }

    function ni(t) {
        var e = Je(t);
        return e ? ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1) : void 0
    }

    function ri(t, e, i) {
        if (e && e.length && t >= 0 && 1 >= t) {
            i = i || [];
            var n = t * (e.length - 1), r = Math.floor(n), a = Math.ceil(n), o = e[r], s = e[a], l = n - r;
            return i[0] = We(Ze(o[0], s[0], l)), i[1] = We(Ze(o[1], s[1], l)), i[2] = We(Ze(o[2], s[2], l)), i[3] = Ue(Ze(o[3], s[3], l)), i
        }
    }

    function ai(t, e, i) {
        if (e && e.length && t >= 0 && 1 >= t) {
            var n = t * (e.length - 1), r = Math.floor(n), a = Math.ceil(n), o = Je(e[r]), s = Je(e[a]), l = n - r,
                u = li([We(Ze(o[0], s[0], l)), We(Ze(o[1], s[1], l)), We(Ze(o[2], s[2], l)), Ue(Ze(o[3], s[3], l))], "rgba");
            return i ? {color: u, leftIndex: r, rightIndex: a, value: n} : u
        }
    }

    function oi(t, e, i, n) {
        return t = Je(t), t ? (t = ei(t), null != e && (t[0] = Xe(e)), null != i && (t[1] = qe(i)), null != n && (t[2] = qe(n)), li(ti(t), "rgba")) : void 0
    }

    function si(t, e) {
        return t = Je(t), t && null != e ? (t[3] = Ue(e), li(t, "rgba")) : void 0
    }

    function li(t, e) {
        if (t && t.length) {
            var i = t[0] + "," + t[1] + "," + t[2];
            return ("rgba" === e || "hsva" === e || "hsla" === e) && (i += "," + t[3]), e + "(" + i + ")"
        }
    }

    function ui(t, e) {
        return t[e]
    }

    function hi(t, e, i) {
        t[e] = i
    }

    function ci(t, e, i) {
        return (e - t) * i + t
    }

    function di(t, e, i) {
        return i > .5 ? e : t
    }

    function fi(t, e, i, n, r) {
        var a = t.length;
        if (1 === r) for (var o = 0; a > o; o++) n[o] = ci(t[o], e[o], i); else for (var s = a && t[0].length, o = 0; a > o; o++) for (var l = 0; s > l; l++) n[o][l] = ci(t[o][l], e[o][l], i)
    }

    function pi(t, e, i) {
        var n = t.length, r = e.length;
        if (n !== r) {
            var a = n > r;
            if (a) t.length = r; else for (var o = n; r > o; o++) t.push(1 === i ? e[o] : qg.call(e[o]))
        }
        for (var s = t[0] && t[0].length, o = 0; o < t.length; o++) if (1 === i) isNaN(t[o]) && (t[o] = e[o]); else for (var l = 0; s > l; l++) isNaN(t[o][l]) && (t[o][l] = e[o][l])
    }

    function gi(t, e, i) {
        if (t === e) return !0;
        var n = t.length;
        if (n !== e.length) return !1;
        if (1 === i) {
            for (var r = 0; n > r; r++) if (t[r] !== e[r]) return !1
        } else for (var a = t[0].length, r = 0; n > r; r++) for (var o = 0; a > o; o++) if (t[r][o] !== e[r][o]) return !1;
        return !0
    }

    function mi(t, e, i, n, r, a, o, s, l) {
        var u = t.length;
        if (1 === l) for (var h = 0; u > h; h++) s[h] = vi(t[h], e[h], i[h], n[h], r, a, o); else for (var c = t[0].length, h = 0; u > h; h++) for (var d = 0; c > d; d++) s[h][d] = vi(t[h][d], e[h][d], i[h][d], n[h][d], r, a, o)
    }

    function vi(t, e, i, n, r, a, o) {
        var s = .5 * (i - t), l = .5 * (n - e);
        return (2 * (e - i) + s + l) * o + (-3 * (e - i) - 2 * s - l) * a + s * r + e
    }

    function yi(t) {
        if (d(t)) {
            var e = t.length;
            if (d(t[0])) {
                for (var i = [], n = 0; e > n; n++) i.push(qg.call(t[n]));
                return i
            }
            return qg.call(t)
        }
        return t
    }

    function xi(t) {
        return t[0] = Math.floor(t[0]), t[1] = Math.floor(t[1]), t[2] = Math.floor(t[2]), "rgba(" + t.join(",") + ")"
    }

    function _i(t) {
        var e = t[t.length - 1].value;
        return d(e && e[0]) ? 2 : 1
    }

    function wi(t, e, i, n, r, a) {
        var o = t._getter, s = t._setter, l = "spline" === e, u = n.length;
        if (u) {
            var h, c = n[0].value, f = d(c), p = !1, g = !1, m = f ? _i(n) : 0;
            n.sort(function (t, e) {
                return t.time - e.time
            }), h = n[u - 1].time;
            for (var v = [], y = [], x = n[0].value, _ = !0, w = 0; u > w; w++) {
                v.push(n[w].time / h);
                var b = n[w].value;
                if (f && gi(b, x, m) || !f && b === x || (_ = !1), x = b, "string" == typeof b) {
                    var S = Je(b);
                    S ? (b = S, p = !0) : g = !0
                }
                y.push(b)
            }
            if (a || !_) {
                for (var M = y[u - 1], w = 0; u - 1 > w; w++) f ? pi(y[w], M, m) : !isNaN(y[w]) || isNaN(M) || g || p || (y[w] = M);
                f && pi(o(t._target, r), M, m);
                var I, C, T, D, A, k, P = 0, L = 0;
                if (p) var O = [0, 0, 0, 0];
                var z = function (t, e) {
                    var i;
                    if (0 > e) i = 0; else if (L > e) {
                        for (I = Math.min(P + 1, u - 1), i = I; i >= 0 && !(v[i] <= e); i--) ;
                        i = Math.min(i, u - 2)
                    } else {
                        for (i = P; u > i && !(v[i] > e); i++) ;
                        i = Math.min(i - 1, u - 2)
                    }
                    P = i, L = e;
                    var n = v[i + 1] - v[i];
                    if (0 !== n) if (C = (e - v[i]) / n, l) if (D = y[i], T = y[0 === i ? i : i - 1], A = y[i > u - 2 ? u - 1 : i + 1], k = y[i > u - 3 ? u - 1 : i + 2], f) mi(T, D, A, k, C, C * C, C * C * C, o(t, r), m); else {
                        var a;
                        if (p) a = mi(T, D, A, k, C, C * C, C * C * C, O, 1), a = xi(O); else {
                            if (g) return di(D, A, C);
                            a = vi(T, D, A, k, C, C * C, C * C * C)
                        }
                        s(t, r, a)
                    } else if (f) fi(y[i], y[i + 1], C, o(t, r), m); else {
                        var a;
                        if (p) fi(y[i], y[i + 1], C, O, 1), a = xi(O); else {
                            if (g) return di(y[i], y[i + 1], C);
                            a = ci(y[i], y[i + 1], C)
                        }
                        s(t, r, a)
                    }
                }, B = new He({target: t._target, life: h, loop: t._loop, delay: t._delay, onframe: z, ondestroy: i});
                return e && "spline" !== e && (B.easing = e), B
            }
        }
    }

    function bi(t, e, i, n, r, a, o, s) {
        function l() {
            h--, h || a && a()
        }

        b(n) ? (a = r, r = n, n = 0) : w(r) ? (a = r, r = "linear", n = 0) : w(n) ? (a = n, n = 0) : w(i) ? (a = i, i = 500) : i || (i = 500), t.stopAnimation(), Si(t, "", t, e, i, n, s);
        var u = t.animators.slice(), h = u.length;
        h || a && a();
        for (var c = 0; c < u.length; c++) u[c].done(l).start(r, o)
    }

    function Si(t, e, i, n, r, a, o) {
        var s = {}, l = 0;
        for (var u in n) n.hasOwnProperty(u) && (null != i[u] ? S(n[u]) && !d(n[u]) ? Si(t, e ? e + "." + u : u, i[u], n[u], r, a, o) : (o ? (s[u] = i[u], Mi(t, e, u, n[u])) : s[u] = n[u], l++) : null == n[u] || o || Mi(t, e, u, n[u]));
        l > 0 && t.animate(e, !1).when(null == r ? 500 : r, s).delay(a || 0)
    }

    function Mi(t, e, i, n) {
        if (e) {
            var r = {};
            r[e] = {}, r[e][i] = n, t.attr(r)
        } else t.attr(i, n)
    }

    function Ii(t, e, i, n) {
        0 > i && (t += i, i = -i), 0 > n && (e += n, n = -n), this.x = t, this.y = e, this.width = i, this.height = n
    }

    function Ci(t) {
        for (var e = 0; t >= om;) e |= 1 & t, t >>= 1;
        return t + e
    }

    function Ti(t, e, i, n) {
        var r = e + 1;
        if (r === i) return 1;
        if (n(t[r++], t[e]) < 0) {
            for (; i > r && n(t[r], t[r - 1]) < 0;) r++;
            Di(t, e, r)
        } else for (; i > r && n(t[r], t[r - 1]) >= 0;) r++;
        return r - e
    }

    function Di(t, e, i) {
        for (i--; i > e;) {
            var n = t[e];
            t[e++] = t[i], t[i--] = n
        }
    }

    function Ai(t, e, i, n, r) {
        for (n === e && n++; i > n; n++) {
            for (var a, o = t[n], s = e, l = n; l > s;) a = s + l >>> 1, r(o, t[a]) < 0 ? l = a : s = a + 1;
            var u = n - s;
            switch (u) {
                case 3:
                    t[s + 3] = t[s + 2];
                case 2:
                    t[s + 2] = t[s + 1];
                case 1:
                    t[s + 1] = t[s];
                    break;
                default:
                    for (; u > 0;) t[s + u] = t[s + u - 1], u--
            }
            t[s] = o
        }
    }

    function ki(t, e, i, n, r, a) {
        var o = 0, s = 0, l = 1;
        if (a(t, e[i + r]) > 0) {
            for (s = n - r; s > l && a(t, e[i + r + l]) > 0;) o = l, l = (l << 1) + 1, 0 >= l && (l = s);
            l > s && (l = s), o += r, l += r
        } else {
            for (s = r + 1; s > l && a(t, e[i + r - l]) <= 0;) o = l, l = (l << 1) + 1, 0 >= l && (l = s);
            l > s && (l = s);
            var u = o;
            o = r - l, l = r - u
        }
        for (o++; l > o;) {
            var h = o + (l - o >>> 1);
            a(t, e[i + h]) > 0 ? o = h + 1 : l = h
        }
        return l
    }

    function Pi(t, e, i, n, r, a) {
        var o = 0, s = 0, l = 1;
        if (a(t, e[i + r]) < 0) {
            for (s = r + 1; s > l && a(t, e[i + r - l]) < 0;) o = l, l = (l << 1) + 1, 0 >= l && (l = s);
            l > s && (l = s);
            var u = o;
            o = r - l, l = r - u
        } else {
            for (s = n - r; s > l && a(t, e[i + r + l]) >= 0;) o = l, l = (l << 1) + 1, 0 >= l && (l = s);
            l > s && (l = s), o += r, l += r
        }
        for (o++; l > o;) {
            var h = o + (l - o >>> 1);
            a(t, e[i + h]) < 0 ? l = h : o = h + 1
        }
        return l
    }

    function Li(t, e) {
        function i(t, e) {
            l[c] = t, u[c] = e, c += 1
        }

        function n() {
            for (; c > 1;) {
                var t = c - 2;
                if (t >= 1 && u[t - 1] <= u[t] + u[t + 1] || t >= 2 && u[t - 2] <= u[t] + u[t - 1]) u[t - 1] < u[t + 1] && t--; else if (u[t] > u[t + 1]) break;
                a(t)
            }
        }

        function r() {
            for (; c > 1;) {
                var t = c - 2;
                t > 0 && u[t - 1] < u[t + 1] && t--, a(t)
            }
        }

        function a(i) {
            var n = l[i], r = u[i], a = l[i + 1], h = u[i + 1];
            u[i] = r + h, i === c - 3 && (l[i + 1] = l[i + 2], u[i + 1] = u[i + 2]), c--;
            var d = Pi(t[a], t, n, r, 0, e);
            n += d, r -= d, 0 !== r && (h = ki(t[n + r - 1], t, a, h, h - 1, e), 0 !== h && (h >= r ? o(n, r, a, h) : s(n, r, a, h)))
        }

        function o(i, n, r, a) {
            var o = 0;
            for (o = 0; n > o; o++) d[o] = t[i + o];
            var s = 0, l = r, u = i;
            if (t[u++] = t[l++], 0 !== --a) {
                if (1 === n) {
                    for (o = 0; a > o; o++) t[u + o] = t[l + o];
                    return void (t[u + a] = d[s])
                }
                for (var c, f, p, g = h; ;) {
                    c = 0, f = 0, p = !1;
                    do if (e(t[l], d[s]) < 0) {
                        if (t[u++] = t[l++], f++, c = 0, 0 === --a) {
                            p = !0;
                            break
                        }
                    } else if (t[u++] = d[s++], c++, f = 0, 1 === --n) {
                        p = !0;
                        break
                    } while (g > (c | f));
                    if (p) break;
                    do {
                        if (c = Pi(t[l], d, s, n, 0, e), 0 !== c) {
                            for (o = 0; c > o; o++) t[u + o] = d[s + o];
                            if (u += c, s += c, n -= c, 1 >= n) {
                                p = !0;
                                break
                            }
                        }
                        if (t[u++] = t[l++], 0 === --a) {
                            p = !0;
                            break
                        }
                        if (f = ki(d[s], t, l, a, 0, e), 0 !== f) {
                            for (o = 0; f > o; o++) t[u + o] = t[l + o];
                            if (u += f, l += f, a -= f, 0 === a) {
                                p = !0;
                                break
                            }
                        }
                        if (t[u++] = d[s++], 1 === --n) {
                            p = !0;
                            break
                        }
                        g--
                    } while (c >= sm || f >= sm);
                    if (p) break;
                    0 > g && (g = 0), g += 2
                }
                if (h = g, 1 > h && (h = 1), 1 === n) {
                    for (o = 0; a > o; o++) t[u + o] = t[l + o];
                    t[u + a] = d[s]
                } else {
                    if (0 === n) throw new Error;
                    for (o = 0; n > o; o++) t[u + o] = d[s + o]
                }
            } else for (o = 0; n > o; o++) t[u + o] = d[s + o]
        }

        function s(i, n, r, a) {
            var o = 0;
            for (o = 0; a > o; o++) d[o] = t[r + o];
            var s = i + n - 1, l = a - 1, u = r + a - 1, c = 0, f = 0;
            if (t[u--] = t[s--], 0 !== --n) {
                if (1 === a) {
                    for (u -= n, s -= n, f = u + 1, c = s + 1, o = n - 1; o >= 0; o--) t[f + o] = t[c + o];
                    return void (t[u] = d[l])
                }
                for (var p = h; ;) {
                    var g = 0, m = 0, v = !1;
                    do if (e(d[l], t[s]) < 0) {
                        if (t[u--] = t[s--], g++, m = 0, 0 === --n) {
                            v = !0;
                            break
                        }
                    } else if (t[u--] = d[l--], m++, g = 0, 1 === --a) {
                        v = !0;
                        break
                    } while (p > (g | m));
                    if (v) break;
                    do {
                        if (g = n - Pi(d[l], t, i, n, n - 1, e), 0 !== g) {
                            for (u -= g, s -= g, n -= g, f = u + 1, c = s + 1, o = g - 1; o >= 0; o--) t[f + o] = t[c + o];
                            if (0 === n) {
                                v = !0;
                                break
                            }
                        }
                        if (t[u--] = d[l--], 1 === --a) {
                            v = !0;
                            break
                        }
                        if (m = a - ki(t[s], d, 0, a, a - 1, e), 0 !== m) {
                            for (u -= m, l -= m, a -= m, f = u + 1, c = l + 1, o = 0; m > o; o++) t[f + o] = d[c + o];
                            if (1 >= a) {
                                v = !0;
                                break
                            }
                        }
                        if (t[u--] = t[s--], 0 === --n) {
                            v = !0;
                            break
                        }
                        p--
                    } while (g >= sm || m >= sm);
                    if (v) break;
                    0 > p && (p = 0), p += 2
                }
                if (h = p, 1 > h && (h = 1), 1 === a) {
                    for (u -= n, s -= n, f = u + 1, c = s + 1, o = n - 1; o >= 0; o--) t[f + o] = t[c + o];
                    t[u] = d[l]
                } else {
                    if (0 === a) throw new Error;
                    for (c = u - (a - 1), o = 0; a > o; o++) t[c + o] = d[o]
                }
            } else for (c = u - (a - 1), o = 0; a > o; o++) t[c + o] = d[o]
        }

        var l, u, h = sm, c = 0, d = [];
        l = [], u = [], this.mergeRuns = n, this.forceMergeRuns = r, this.pushRun = i
    }

    function Oi(t, e, i, n) {
        i || (i = 0), n || (n = t.length);
        var r = n - i;
        if (!(2 > r)) {
            var a = 0;
            if (om > r) return a = Ti(t, i, n, e), void Ai(t, i, n, i + a, e);
            var o = new Li(t, e), s = Ci(r);
            do {
                if (a = Ti(t, i, n, e), s > a) {
                    var l = r;
                    l > s && (l = s), Ai(t, i, i + l, i + a, e), a = l
                }
                o.pushRun(i, a), o.mergeRuns(), r -= a, i += a
            } while (0 !== r);
            o.forceMergeRuns()
        }
    }

    function zi(t, e) {
        return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel
    }

    function Bi(t, e, i) {
        var n = null == e.x ? 0 : e.x, r = null == e.x2 ? 1 : e.x2, a = null == e.y ? 0 : e.y,
            o = null == e.y2 ? 0 : e.y2;
        e.global || (n = n * i.width + i.x, r = r * i.width + i.x, a = a * i.height + i.y, o = o * i.height + i.y), n = isNaN(n) ? 0 : n, r = isNaN(r) ? 1 : r, a = isNaN(a) ? 0 : a, o = isNaN(o) ? 0 : o;
        var s = t.createLinearGradient(n, a, r, o);
        return s
    }

    function Ei(t, e, i) {
        var n = i.width, r = i.height, a = Math.min(n, r), o = null == e.x ? .5 : e.x, s = null == e.y ? .5 : e.y,
            l = null == e.r ? .5 : e.r;
        e.global || (o = o * n + i.x, s = s * r + i.y, l *= a);
        var u = t.createRadialGradient(o, s, 0, o, s, l);
        return u
    }

    function Ni() {
        return !1
    }

    function Ri(t, e, i) {
        var n = ig(), r = e.getWidth(), a = e.getHeight(), o = n.style;
        return o && (o.position = "absolute", o.left = 0, o.top = 0, o.width = r + "px", o.height = a + "px", n.setAttribute("data-zr-dom-id", t)), n.width = r * i, n.height = a * i, n
    }

    function Fi(t) {
        if ("string" == typeof t) {
            var e = wm.get(t);
            return e && e.image
        }
        return t
    }

    function Vi(t, e, i, n, r) {
        if (t) {
            if ("string" == typeof t) {
                if (e && e.__zrImageSrc === t || !i) return e;
                var a = wm.get(t), o = {hostEl: i, cb: n, cbPayload: r};
                return a ? (e = a.image, !Hi(e) && a.pending.push(o)) : (e = new Image, e.onload = e.onerror = Gi, wm.put(t, e.__cachedImgObj = {
                    image: e,
                    pending: [o]
                }), e.src = e.__zrImageSrc = t), e
            }
            return t
        }
        return e
    }

    function Gi() {
        var t = this.__cachedImgObj;
        this.onload = this.onerror = this.__cachedImgObj = null;
        for (var e = 0; e < t.pending.length; e++) {
            var i = t.pending[e], n = i.cb;
            n && n(this, i.cbPayload), i.hostEl.dirty()
        }
        t.pending.length = 0
    }

    function Hi(t) {
        return t && t.width && t.height
    }

    function Wi(t, e) {
        e = e || Cm;
        var i = t + ":" + e;
        if (bm[i]) return bm[i];
        for (var n = (t + "").split("\n"), r = 0, a = 0, o = n.length; o > a; a++) r = Math.max(en(n[a], e).width, r);
        return Sm > Mm && (Sm = 0, bm = {}), Sm++, bm[i] = r, r
    }

    function Xi(t, e, i, n, r, a, o, s) {
        return o ? Yi(t, e, i, n, r, a, o, s) : Ui(t, e, i, n, r, a, s)
    }

    function Ui(t, e, i, n, r, a, o) {
        var s = nn(t, e, r, a, o), l = Wi(t, e);
        r && (l += r[1] + r[3]);
        var u = s.outerHeight, h = qi(0, l, i), c = ji(0, u, n), d = new Ii(h, c, l, u);
        return d.lineHeight = s.lineHeight, d
    }

    function Yi(t, e, i, n, r, a, o, s) {
        var l = rn(t, {rich: o, truncate: s, font: e, textAlign: i, textPadding: r, textLineHeight: a}),
            u = l.outerWidth, h = l.outerHeight, c = qi(0, u, i), d = ji(0, h, n);
        return new Ii(c, d, u, h)
    }

    function qi(t, e, i) {
        return "right" === i ? t -= e : "center" === i && (t -= e / 2), t
    }

    function ji(t, e, i) {
        return "middle" === i ? t -= e / 2 : "bottom" === i && (t -= e), t
    }

    function Zi(t, e, i) {
        var n = e.textPosition, r = e.textDistance, a = i.x, o = i.y;
        r = r || 0;
        var s = i.height, l = i.width, u = s / 2, h = "left", c = "top";
        switch (n) {
            case"left":
                a -= r, o += u, h = "right", c = "middle";
                break;
            case"right":
                a += r + l, o += u, c = "middle";
                break;
            case"top":
                a += l / 2, o -= r, h = "center", c = "bottom";
                break;
            case"bottom":
                a += l / 2, o += s + r, h = "center";
                break;
            case"inside":
                a += l / 2, o += u, h = "center", c = "middle";
                break;
            case"insideLeft":
                a += r, o += u, c = "middle";
                break;
            case"insideRight":
                a += l - r, o += u, h = "right", c = "middle";
                break;
            case"insideTop":
                a += l / 2, o += r, h = "center";
                break;
            case"insideBottom":
                a += l / 2, o += s - r, h = "center", c = "bottom";
                break;
            case"insideTopLeft":
                a += r, o += r;
                break;
            case"insideTopRight":
                a += l - r, o += r, h = "right";
                break;
            case"insideBottomLeft":
                a += r, o += s - r, c = "bottom";
                break;
            case"insideBottomRight":
                a += l - r, o += s - r, h = "right", c = "bottom"
        }
        return t = t || {}, t.x = a, t.y = o, t.textAlign = h, t.textVerticalAlign = c, t
    }

    function Ki(t, e, i, n, r) {
        if (!e) return "";
        var a = (t + "").split("\n");
        r = $i(e, i, n, r);
        for (var o = 0, s = a.length; s > o; o++) a[o] = Qi(a[o], r);
        return a.join("\n")
    }

    function $i(t, e, i, n) {
        n = o({}, n), n.font = e;
        var i = A(i, "...");
        n.maxIterations = A(n.maxIterations, 2);
        var r = n.minChar = A(n.minChar, 0);
        n.cnCharWidth = Wi("国", e);
        var a = n.ascCharWidth = Wi("a", e);
        n.placeholder = A(n.placeholder, "");
        for (var s = t = Math.max(0, t - 1), l = 0; r > l && s >= a; l++) s -= a;
        var u = Wi(i, e);
        return u > s && (i = "", u = 0), s = t - u, n.ellipsis = i, n.ellipsisWidth = u, n.contentWidth = s, n.containerWidth = t, n
    }

    function Qi(t, e) {
        var i = e.containerWidth, n = e.font, r = e.contentWidth;
        if (!i) return "";
        var a = Wi(t, n);
        if (i >= a) return t;
        for (var o = 0; ; o++) {
            if (r >= a || o >= e.maxIterations) {
                t += e.ellipsis;
                break
            }
            var s = 0 === o ? Ji(t, r, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * r / a) : 0;
            t = t.substr(0, s), a = Wi(t, n)
        }
        return "" === t && (t = e.placeholder), t
    }

    function Ji(t, e, i, n) {
        for (var r = 0, a = 0, o = t.length; o > a && e > r; a++) {
            var s = t.charCodeAt(a);
            r += s >= 0 && 127 >= s ? i : n
        }
        return a
    }

    function tn(t) {
        return Wi("国", t)
    }

    function en(t, e) {
        return Tm.measureText(t, e)
    }

    function nn(t, e, i, n, r) {
        null != t && (t += "");
        var a = A(n, tn(e)), o = t ? t.split("\n") : [], s = o.length * a, l = s, u = !0;
        if (i && (l += i[0] + i[2]), t && r) {
            u = !1;
            var h = r.outerHeight, c = r.outerWidth;
            if (null != h && l > h) t = "", o = []; else if (null != c) for (var d = $i(c - (i ? i[1] + i[3] : 0), e, r.ellipsis, {
                minChar: r.minChar,
                placeholder: r.placeholder
            }), f = 0, p = o.length; p > f; f++) o[f] = Qi(o[f], d)
        }
        return {lines: o, height: s, outerHeight: l, lineHeight: a, canCacheByTextString: u}
    }

    function rn(t, e) {
        var i = {lines: [], width: 0, height: 0};
        if (null != t && (t += ""), !t) return i;
        for (var n, r = Im.lastIndex = 0; null != (n = Im.exec(t));) {
            var a = n.index;
            a > r && an(i, t.substring(r, a)), an(i, n[2], n[1]), r = Im.lastIndex
        }
        r < t.length && an(i, t.substring(r, t.length));
        var o = i.lines, s = 0, l = 0, u = [], h = e.textPadding, c = e.truncate, d = c && c.outerWidth,
            f = c && c.outerHeight;
        h && (null != d && (d -= h[1] + h[3]), null != f && (f -= h[0] + h[2]));
        for (var p = 0; p < o.length; p++) {
            for (var g = o[p], m = 0, v = 0, y = 0; y < g.tokens.length; y++) {
                var x = g.tokens[y], _ = x.styleName && e.rich[x.styleName] || {}, w = x.textPadding = _.textPadding,
                    b = x.font = _.font || e.font, S = x.textHeight = A(_.textHeight, tn(b));
                if (w && (S += w[0] + w[2]), x.height = S, x.lineHeight = k(_.textLineHeight, e.textLineHeight, S), x.textAlign = _ && _.textAlign || e.textAlign, x.textVerticalAlign = _ && _.textVerticalAlign || "middle", null != f && s + x.lineHeight > f) return {
                    lines: [],
                    width: 0,
                    height: 0
                };
                x.textWidth = Wi(x.text, b);
                var M = _.textWidth, I = null == M || "auto" === M;
                if ("string" == typeof M && "%" === M.charAt(M.length - 1)) x.percentWidth = M, u.push(x), M = 0; else {
                    if (I) {
                        M = x.textWidth;
                        var C = _.textBackgroundColor, T = C && C.image;
                        T && (T = Fi(T), Hi(T) && (M = Math.max(M, T.width * S / T.height)))
                    }
                    var D = w ? w[1] + w[3] : 0;
                    M += D;
                    var P = null != d ? d - v : null;
                    null != P && M > P && (!I || D > P ? (x.text = "", x.textWidth = M = 0) : (x.text = Ki(x.text, P - D, b, c.ellipsis, {minChar: c.minChar}), x.textWidth = Wi(x.text, b), M = x.textWidth + D))
                }
                v += x.width = M, _ && (m = Math.max(m, x.lineHeight))
            }
            g.width = v, g.lineHeight = m, s += m, l = Math.max(l, v)
        }
        i.outerWidth = i.width = A(e.textWidth, l), i.outerHeight = i.height = A(e.textHeight, s), h && (i.outerWidth += h[1] + h[3], i.outerHeight += h[0] + h[2]);
        for (var p = 0; p < u.length; p++) {
            var x = u[p], L = x.percentWidth;
            x.width = parseInt(L, 10) / 100 * l
        }
        return i
    }

    function an(t, e, i) {
        for (var n = "" === e, r = e.split("\n"), a = t.lines, o = 0; o < r.length; o++) {
            var s = r[o], l = {styleName: i, text: s, isLineHolder: !s && !n};
            if (o) a.push({tokens: [l]}); else {
                var u = (a[a.length - 1] || (a[0] = {tokens: []})).tokens, h = u.length;
                1 === h && u[0].isLineHolder ? u[0] = l : (s || !h || n) && u.push(l)
            }
        }
    }

    function on(t) {
        var e = (t.fontSize || t.fontFamily) && [t.fontStyle, t.fontWeight, (t.fontSize || 12) + "px", t.fontFamily || "sans-serif"].join(" ");
        return e && z(e) || t.textFont || t.font
    }

    function sn(t, e) {
        var i, n, r, a, o = e.x, s = e.y, l = e.width, u = e.height, h = e.r;
        0 > l && (o += l, l = -l), 0 > u && (s += u, u = -u), "number" == typeof h ? i = n = r = a = h : h instanceof Array ? 1 === h.length ? i = n = r = a = h[0] : 2 === h.length ? (i = r = h[0], n = a = h[1]) : 3 === h.length ? (i = h[0], n = a = h[1], r = h[2]) : (i = h[0], n = h[1], r = h[2], a = h[3]) : i = n = r = a = 0;
        var c;
        i + n > l && (c = i + n, i *= l / c, n *= l / c), r + a > l && (c = r + a, r *= l / c, a *= l / c), n + r > u && (c = n + r, n *= u / c, r *= u / c), i + a > u && (c = i + a, i *= u / c, a *= u / c), t.moveTo(o + i, s), t.lineTo(o + l - n, s), 0 !== n && t.arc(o + l - n, s + n, n, -Math.PI / 2, 0), t.lineTo(o + l, s + u - r), 0 !== r && t.arc(o + l - r, s + u - r, r, 0, Math.PI / 2), t.lineTo(o + a, s + u), 0 !== a && t.arc(o + a, s + u - a, a, Math.PI / 2, Math.PI), t.lineTo(o, s + i), 0 !== i && t.arc(o + i, s + i, i, Math.PI, 1.5 * Math.PI)
    }

    function ln(t) {
        return un(t), f(t.rich, un), t
    }

    function un(t) {
        if (t) {
            t.font = on(t);
            var e = t.textAlign;
            "middle" === e && (e = "center"), t.textAlign = null == e || Am[e] ? e : "left";
            var i = t.textVerticalAlign || t.textBaseline;
            "center" === i && (i = "middle"), t.textVerticalAlign = null == i || km[i] ? i : "top";
            var n = t.textPadding;
            n && (t.textPadding = L(t.textPadding))
        }
    }

    function hn(t, e, i, n, r, a) {
        n.rich ? dn(t, e, i, n, r, a) : cn(t, e, i, n, r, a)
    }

    function cn(t, e, i, n, r, a) {
        var o, s = mn(n), l = !1, u = e.__attrCachedBy === cm.PLAIN_TEXT;
        a !== dm ? (a && (o = a.style, l = !s && u && o), e.__attrCachedBy = s ? cm.NONE : cm.PLAIN_TEXT) : u && (e.__attrCachedBy = cm.NONE);
        var h = n.font || Dm;
        l && h === (o.font || Dm) || (e.font = h);
        var c = t.__computedFont;
        t.__styleFont !== h && (t.__styleFont = h, c = t.__computedFont = e.font);
        var d = n.textPadding, f = n.textLineHeight, p = t.__textCotentBlock;
        (!p || t.__dirtyText) && (p = t.__textCotentBlock = nn(i, c, d, f, n.truncate));
        var g = p.outerHeight, m = p.lines, v = p.lineHeight, y = xn(Om, t, n, r), x = y.baseX, _ = y.baseY,
            w = y.textAlign || "left", b = y.textVerticalAlign;
        pn(e, n, r, x, _);
        var S = ji(_, g, b), M = x, I = S;
        if (s || d) {
            var C = Wi(i, c), T = C;
            d && (T += d[1] + d[3]);
            var D = qi(x, T, w);
            s && vn(t, e, n, D, S, T, g), d && (M = Mn(x, w, d), I += d[0])
        }
        e.textAlign = w, e.textBaseline = "middle", e.globalAlpha = n.opacity || 1;
        for (var A = 0; A < Pm.length; A++) {
            var k = Pm[A], P = k[0], L = k[1], O = n[P];
            l && O === o[P] || (e[L] = hm(e, L, O || k[2]))
        }
        I += v / 2;
        var z = n.textStrokeWidth, B = l ? o.textStrokeWidth : null, E = !l || z !== B,
            N = !l || E || n.textStroke !== o.textStroke, R = wn(n.textStroke, z), F = bn(n.textFill);
        if (R && (E && (e.lineWidth = z), N && (e.strokeStyle = R)), F && (l && n.textFill === o.textFill || (e.fillStyle = F)), 1 === m.length) R && e.strokeText(m[0], M, I), F && e.fillText(m[0], M, I); else for (var A = 0; A < m.length; A++) R && e.strokeText(m[A], M, I), F && e.fillText(m[A], M, I), I += v
    }

    function dn(t, e, i, n, r, a) {
        a !== dm && (e.__attrCachedBy = cm.NONE);
        var o = t.__textCotentBlock;
        (!o || t.__dirtyText) && (o = t.__textCotentBlock = rn(i, n)), fn(t, e, o, n, r)
    }

    function fn(t, e, i, n, r) {
        var a = i.width, o = i.outerWidth, s = i.outerHeight, l = n.textPadding, u = xn(Om, t, n, r), h = u.baseX,
            c = u.baseY, d = u.textAlign, f = u.textVerticalAlign;
        pn(e, n, r, h, c);
        var p = qi(h, o, d), g = ji(c, s, f), m = p, v = g;
        l && (m += l[3], v += l[0]);
        var y = m + a;
        mn(n) && vn(t, e, n, p, g, o, s);
        for (var x = 0; x < i.lines.length; x++) {
            for (var _, w = i.lines[x], b = w.tokens, S = b.length, M = w.lineHeight, I = w.width, C = 0, T = m, D = y, A = S - 1; S > C && (_ = b[C], !_.textAlign || "left" === _.textAlign);) gn(t, e, _, n, M, v, T, "left"), I -= _.width, T += _.width, C++;
            for (; A >= 0 && (_ = b[A], "right" === _.textAlign);) gn(t, e, _, n, M, v, D, "right"), I -= _.width, D -= _.width, A--;
            for (T += (a - (T - m) - (y - D) - I) / 2; A >= C;) _ = b[C], gn(t, e, _, n, M, v, T + _.width / 2, "center"), T += _.width, C++;
            v += M
        }
    }

    function pn(t, e, i, n, r) {
        if (i && e.textRotation) {
            var a = e.textOrigin;
            "center" === a ? (n = i.width / 2 + i.x, r = i.height / 2 + i.y) : a && (n = a[0] + i.x, r = a[1] + i.y), t.translate(n, r), t.rotate(-e.textRotation), t.translate(-n, -r)
        }
    }

    function gn(t, e, i, n, r, a, o, s) {
        var l = n.rich[i.styleName] || {};
        l.text = i.text;
        var u = i.textVerticalAlign, h = a + r / 2;
        "top" === u ? h = a + i.height / 2 : "bottom" === u && (h = a + r - i.height / 2), !i.isLineHolder && mn(l) && vn(t, e, l, "right" === s ? o - i.width : "center" === s ? o - i.width / 2 : o, h - i.height / 2, i.width, i.height);
        var c = i.textPadding;
        c && (o = Mn(o, s, c), h -= i.height / 2 - c[2] - i.textHeight / 2), _n(e, "shadowBlur", k(l.textShadowBlur, n.textShadowBlur, 0)), _n(e, "shadowColor", l.textShadowColor || n.textShadowColor || "transparent"), _n(e, "shadowOffsetX", k(l.textShadowOffsetX, n.textShadowOffsetX, 0)), _n(e, "shadowOffsetY", k(l.textShadowOffsetY, n.textShadowOffsetY, 0)), _n(e, "textAlign", s), _n(e, "textBaseline", "middle"), _n(e, "font", i.font || Dm);
        var d = wn(l.textStroke || n.textStroke, p), f = bn(l.textFill || n.textFill),
            p = A(l.textStrokeWidth, n.textStrokeWidth);
        d && (_n(e, "lineWidth", p), _n(e, "strokeStyle", d), e.strokeText(i.text, o, h)), f && (_n(e, "fillStyle", f), e.fillText(i.text, o, h))
    }

    function mn(t) {
        return !!(t.textBackgroundColor || t.textBorderWidth && t.textBorderColor)
    }

    function vn(t, e, i, n, r, a, o) {
        var s = i.textBackgroundColor, l = i.textBorderWidth, u = i.textBorderColor, h = b(s);
        if (_n(e, "shadowBlur", i.textBoxShadowBlur || 0), _n(e, "shadowColor", i.textBoxShadowColor || "transparent"), _n(e, "shadowOffsetX", i.textBoxShadowOffsetX || 0), _n(e, "shadowOffsetY", i.textBoxShadowOffsetY || 0), h || l && u) {
            e.beginPath();
            var c = i.textBorderRadius;
            c ? sn(e, {x: n, y: r, width: a, height: o, r: c}) : e.rect(n, r, a, o), e.closePath()
        }
        if (h) if (_n(e, "fillStyle", s), null != i.fillOpacity) {
            var d = e.globalAlpha;
            e.globalAlpha = i.fillOpacity * i.opacity, e.fill(), e.globalAlpha = d
        } else e.fill(); else if (S(s)) {
            var f = s.image;
            f = Vi(f, null, t, yn, s), f && Hi(f) && e.drawImage(f, n, r, a, o)
        }
        if (l && u) if (_n(e, "lineWidth", l), _n(e, "strokeStyle", u), null != i.strokeOpacity) {
            var d = e.globalAlpha;
            e.globalAlpha = i.strokeOpacity * i.opacity, e.stroke(), e.globalAlpha = d
        } else e.stroke()
    }

    function yn(t, e) {
        e.image = t
    }

    function xn(t, e, i, n) {
        var r = i.x || 0, a = i.y || 0, o = i.textAlign, s = i.textVerticalAlign;
        if (n) {
            var l = i.textPosition;
            if (l instanceof Array) r = n.x + Sn(l[0], n.width), a = n.y + Sn(l[1], n.height); else {
                var u = e && e.calculateTextPosition ? e.calculateTextPosition(Lm, i, n) : Zi(Lm, i, n);
                r = u.x, a = u.y, o = o || u.textAlign, s = s || u.textVerticalAlign
            }
            var h = i.textOffset;
            h && (r += h[0], a += h[1])
        }
        return t = t || {}, t.baseX = r, t.baseY = a, t.textAlign = o, t.textVerticalAlign = s, t
    }

    function _n(t, e, i) {
        return t[e] = hm(t, e, i), t[e]
    }

    function wn(t, e) {
        return null == t || 0 >= e || "transparent" === t || "none" === t ? null : t.image || t.colorStops ? "#000" : t
    }

    function bn(t) {
        return null == t || "none" === t ? null : t.image || t.colorStops ? "#000" : t
    }

    function Sn(t, e) {
        return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t
    }

    function Mn(t, e, i) {
        return "right" === e ? t - i[1] : "center" === e ? t + i[3] / 2 - i[1] / 2 : t + i[3]
    }

    function In(t, e) {
        return null != t && (t || e.textBackgroundColor || e.textBorderWidth && e.textBorderColor || e.textPadding)
    }

    function Cn(t) {
        t = t || {}, em.call(this, t);
        for (var e in t) t.hasOwnProperty(e) && "style" !== e && (this[e] = t[e]);
        this.style = new pm(t.style, this), this._rect = null, this.__clipPaths = null
    }

    function Tn(t) {
        Cn.call(this, t)
    }

    function Dn(t) {
        return parseInt(t, 10)
    }

    function An(t) {
        return t ? t.__builtin__ ? !0 : "function" != typeof t.resize || "function" != typeof t.refresh ? !1 : !0 : !1
    }

    function kn(t, e, i) {
        return Vm.copy(t.getBoundingRect()), t.transform && Vm.applyTransform(t.transform), Gm.width = e, Gm.height = i, !Vm.intersect(Gm)
    }

    function Pn(t, e) {
        if (t === e) return !1;
        if (!t || !e || t.length !== e.length) return !0;
        for (var i = 0; i < t.length; i++) if (t[i] !== e[i]) return !0;
        return !1
    }

    function Ln(t, e) {
        for (var i = 0; i < t.length; i++) {
            var n = t[i];
            n.setTransform(e), e.beginPath(), n.buildPath(e, n.shape), e.clip(), n.restoreTransform(e)
        }
    }

    function On(t, e) {
        var i = document.createElement("div");
        return i.style.cssText = ["position:relative", "width:" + t + "px", "height:" + e + "px", "padding:0", "margin:0", "border-width:0"].join(";") + ";", i
    }

    function zn(t) {
        return "mousewheel" === t && Up.browser.firefox ? "DOMMouseScroll" : t
    }

    function Bn(t) {
        var e = t.pointerType;
        return "pen" === e || "touch" === e
    }

    function En(t) {
        t.touching = !0, null != t.touchTimer && (clearTimeout(t.touchTimer), t.touchTimer = null), t.touchTimer = setTimeout(function () {
            t.touching = !1, t.touchTimer = null
        }, 700)
    }

    function Nn(t) {
        t && (t.zrByTouch = !0)
    }

    function Rn(t, e) {
        return be(t.dom, new Vn(t, e), !0)
    }

    function Fn(t, e) {
        for (var i = e, n = !1; i && 9 !== i.nodeType && !(n = i.domBelongToZr || i !== e && i === t.painterRoot);) i = i.parentNode;
        return n
    }

    function Vn(t, e) {
        this.type = e.type, this.target = this.currentTarget = t.dom, this.pointerType = e.pointerType, this.clientX = e.clientX, this.clientY = e.clientY
    }

    function Gn(t, e) {
        var i = e.domHandlers;
        Up.pointerEventsSupported ? f(Ym.pointer, function (n) {
            Wn(e, n, function (e) {
                i[n].call(t, e)
            })
        }) : (Up.touchEventsSupported && f(Ym.touch, function (n) {
            Wn(e, n, function (r) {
                i[n].call(t, r), En(e)
            })
        }), f(Ym.mouse, function (n) {
            Wn(e, n, function (r) {
                r = we(r), e.touching || i[n].call(t, r)
            })
        }))
    }

    function Hn(t, e) {
        function i(i) {
            function n(n) {
                n = we(n), Fn(t, n.target) || (n = Rn(t, n), e.domHandlers[i].call(t, n))
            }

            Wn(e, i, n, {capture: !0})
        }

        Up.pointerEventsSupported ? f(qm.pointer, i) : Up.touchEventsSupported || f(qm.mouse, i)
    }

    function Wn(t, e, i, n) {
        t.mounted[e] = i, t.listenerOpts[e] = n, Se(t.domTarget, zn(e), i, n)
    }

    function Xn(t) {
        var e = t.mounted;
        for (var i in e) e.hasOwnProperty(i) && Me(t.domTarget, zn(i), e[i], t.listenerOpts[i]);
        t.mounted = {}
    }

    function Un(t, e) {
        if (t._mayPointerCapture = null, Um && t._pointerCapturing ^ e) {
            t._pointerCapturing = e;
            var i = t._globalHandlerScope;
            e ? Hn(t, i) : Xn(i)
        }
    }

    function Yn(t, e) {
        this.domTarget = t, this.domHandlers = e, this.mounted = {}, this.listenerOpts = {}, this.touchTimer = null, this.touching = !1
    }

    function qn(t, e) {
        fg.call(this), this.dom = t, this.painterRoot = e, this._localHandlerScope = new Yn(t, Zm), Um && (this._globalHandlerScope = new Yn(document, Km)), this._pointerCapturing = !1, this._mayPointerCapture = null, Gn(this, this._localHandlerScope)
    }

    function jn(t, e) {
        var i = new iv(Wp(), t, e);
        return tv[i.id] = i, i
    }

    function Zn(t) {
        if (t) t.dispose(); else {
            for (var e in tv) tv.hasOwnProperty(e) && tv[e].dispose();
            tv = {}
        }
        return this
    }

    function Kn(t) {
        return tv[t]
    }

    function $n(t, e) {
        Jm[t] = e
    }

    function Qn(t) {
        delete tv[t]
    }

    function Jn(t) {
        return t instanceof Array ? t : null == t ? [] : [t]
    }

    function tr(t, e, i) {
        if (t) {
            t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {};
            for (var n = 0, r = i.length; r > n; n++) {
                var a = i[n];
                !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a])
            }
        }
    }

    function er(t) {
        return !av(t) || ov(t) || t instanceof Date ? t : t.value
    }

    function ir(t) {
        return av(t) && !(t instanceof Array)
    }

    function nr(t, e) {
        e = (e || []).slice();
        var i = p(t || [], function (t) {
            return {exist: t}
        });
        return rv(e, function (t, n) {
            if (av(t)) {
                for (var r = 0; r < i.length; r++) if (!i[r].option && null != t.id && i[r].exist.id === t.id + "") return i[r].option = t, void (e[n] = null);
                for (var r = 0; r < i.length; r++) {
                    var a = i[r].exist;
                    if (!(i[r].option || null != a.id && null != t.id || null == t.name || or(t) || or(a) || a.name !== t.name + "")) return i[r].option = t, void (e[n] = null)
                }
            }
        }), rv(e, function (t) {
            if (av(t)) {
                for (var e = 0; e < i.length; e++) {
                    var n = i[e].exist;
                    if (!i[e].option && !or(n) && null == t.id) {
                        i[e].option = t;
                        break
                    }
                }
                e >= i.length && i.push({option: t})
            }
        }), i
    }

    function rr(t) {
        var e = R();
        rv(t, function (t) {
            var i = t.exist;
            i && e.set(i.id, t)
        }), rv(t, function (t) {
            var i = t.option;
            O(!i || null == i.id || !e.get(i.id) || e.get(i.id) === t, "id duplicates: " + (i && i.id)), i && null != i.id && e.set(i.id, t), !t.keyInfo && (t.keyInfo = {})
        }), rv(t, function (t, i) {
            var n = t.exist, r = t.option, a = t.keyInfo;
            if (av(r)) {
                if (a.name = null != r.name ? r.name + "" : n ? n.name : sv + i, n) a.id = n.id; else if (null != r.id) a.id = r.id + ""; else {
                    var o = 0;
                    do a.id = "\x00" + a.name + "\x00" + o++; while (e.get(a.id))
                }
                e.set(a.id, t)
            }
        })
    }

    function ar(t) {
        var e = t.name;
        return !(!e || !e.indexOf(sv))
    }

    function or(t) {
        return av(t) && t.id && 0 === (t.id + "").indexOf("\x00_ec_\x00")
    }

    function sr(t, e) {
        return null != e.dataIndexInside ? e.dataIndexInside : null != e.dataIndex ? _(e.dataIndex) ? p(e.dataIndex, function (e) {
            return t.indexOfRawIndex(e)
        }) : t.indexOfRawIndex(e.dataIndex) : null != e.name ? _(e.name) ? p(e.name, function (e) {
            return t.indexOfName(e)
        }) : t.indexOfName(e.name) : void 0
    }

    function lr() {
        var t = "__\x00ec_inner_" + uv++ + "_" + Math.random().toFixed(5);
        return function (e) {
            return e[t] || (e[t] = {})
        }
    }

    function ur(t, e, i) {
        if (b(e)) {
            var n = {};
            n[e + "Index"] = 0, e = n
        }
        var r = i && i.defaultMainType;
        !r || hr(e, r + "Index") || hr(e, r + "Id") || hr(e, r + "Name") || (e[r + "Index"] = 0);
        var a = {};
        return rv(e, function (n, r) {
            var n = e[r];
            if ("dataIndex" === r || "dataIndexInside" === r) return void (a[r] = n);
            var o = r.match(/^(\w+)(Index|Id|Name)$/) || [], s = o[1], l = (o[2] || "").toLowerCase();
            if (!(!s || !l || null == n || "index" === l && "none" === n || i && i.includeMainTypes && u(i.includeMainTypes, s) < 0)) {
                var h = {mainType: s};
                ("index" !== l || "all" !== n) && (h[l] = n);
                var c = t.queryComponents(h);
                a[s + "Models"] = c, a[s + "Model"] = c[0]
            }
        }), a
    }

    function hr(t, e) {
        return t && t.hasOwnProperty(e)
    }

    function cr(t, e, i) {
        t.setAttribute ? t.setAttribute(e, i) : t[e] = i
    }

    function dr(t, e) {
        return t.getAttribute ? t.getAttribute(e) : t[e]
    }

    function fr(t) {
        return "auto" === t ? Up.domSupported ? "html" : "richText" : t || "html"
    }

    function pr(t) {
        var e = {main: "", sub: ""};
        return t && (t = t.split(hv), e.main = t[0] || "", e.sub = t[1] || ""), e
    }

    function gr(t) {
        O(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal')
    }

    function mr(t) {
        t.$constructor = t, t.extend = function (t) {
            var e = this, i = function () {
                t.$constructor ? t.$constructor.apply(this, arguments) : e.apply(this, arguments)
            };
            return o(i.prototype, t), i.extend = this.extend, i.superCall = yr, i.superApply = xr, h(i, this), i.superClass = e, i
        }
    }

    function vr(t) {
        var e = ["__\x00is_clz", dv++, Math.random().toFixed(3)].join("_");
        t.prototype[e] = !0, t.isInstance = function (t) {
            return !(!t || !t[e])
        }
    }

    function yr(t, e) {
        var i = P(arguments, 2);
        return this.superClass.prototype[e].apply(t, i)
    }

    function xr(t, e, i) {
        return this.superClass.prototype[e].apply(t, i)
    }

    function _r(t, e) {
        function i(t) {
            var e = n[t.main];
            return e && e[cv] || (e = n[t.main] = {}, e[cv] = !0), e
        }

        e = e || {};
        var n = {};
        if (t.registerClass = function (t, e) {
            if (e) if (gr(e), e = pr(e), e.sub) {
                if (e.sub !== cv) {
                    var r = i(e);
                    r[e.sub] = t
                }
            } else n[e.main] = t;
            return t
        }, t.getClass = function (t, e, i) {
            var r = n[t];
            if (r && r[cv] && (r = e ? r[e] : null), i && !r) throw new Error(e ? "Component " + t + "." + (e || "") + " not exists. Load it first." : t + ".type should be specified.");
            return r
        }, t.getClassesByMainType = function (t) {
            t = pr(t);
            var e = [], i = n[t.main];
            return i && i[cv] ? f(i, function (t, i) {
                i !== cv && e.push(t)
            }) : e.push(i), e
        }, t.hasClass = function (t) {
            return t = pr(t), !!n[t.main]
        }, t.getAllClassMainTypes = function () {
            var t = [];
            return f(n, function (e, i) {
                t.push(i)
            }), t
        }, t.hasSubTypes = function (t) {
            t = pr(t);
            var e = n[t.main];
            return e && e[cv]
        }, t.parseClassType = pr, e.registerWhenExtend) {
            var r = t.extend;
            r && (t.extend = function (e) {
                var i = r.call(this, e);
                return t.registerClass(i, e.type)
            })
        }
        return t
    }

    function wr(t) {
        return t > -_v && _v > t
    }

    function br(t) {
        return t > _v || -_v > t
    }

    function Sr(t, e, i, n, r) {
        var a = 1 - r;
        return a * a * (a * t + 3 * r * e) + r * r * (r * n + 3 * a * i)
    }

    function Mr(t, e, i, n, r) {
        var a = 1 - r;
        return 3 * (((e - t) * a + 2 * (i - e) * r) * a + (n - i) * r * r)
    }

    function Ir(t, e, i, n, r, a) {
        var o = n + 3 * (e - i) - t, s = 3 * (i - 2 * e + t), l = 3 * (e - t), u = t - r, h = s * s - 3 * o * l,
            c = s * l - 9 * o * u, d = l * l - 3 * s * u, f = 0;
        if (wr(h) && wr(c)) if (wr(s)) a[0] = 0; else {
            var p = -l / s;
            p >= 0 && 1 >= p && (a[f++] = p)
        } else {
            var g = c * c - 4 * h * d;
            if (wr(g)) {
                var m = c / h, p = -s / o + m, v = -m / 2;
                p >= 0 && 1 >= p && (a[f++] = p), v >= 0 && 1 >= v && (a[f++] = v)
            } else if (g > 0) {
                var y = xv(g), x = h * s + 1.5 * o * (-c + y), _ = h * s + 1.5 * o * (-c - y);
                x = 0 > x ? -yv(-x, Sv) : yv(x, Sv), _ = 0 > _ ? -yv(-_, Sv) : yv(_, Sv);
                var p = (-s - (x + _)) / (3 * o);
                p >= 0 && 1 >= p && (a[f++] = p)
            } else {
                var w = (2 * h * s - 3 * o * c) / (2 * xv(h * h * h)), b = Math.acos(w) / 3, S = xv(h), M = Math.cos(b),
                    p = (-s - 2 * S * M) / (3 * o), v = (-s + S * (M + bv * Math.sin(b))) / (3 * o),
                    I = (-s + S * (M - bv * Math.sin(b))) / (3 * o);
                p >= 0 && 1 >= p && (a[f++] = p), v >= 0 && 1 >= v && (a[f++] = v), I >= 0 && 1 >= I && (a[f++] = I)
            }
        }
        return f
    }

    function Cr(t, e, i, n, r) {
        var a = 6 * i - 12 * e + 6 * t, o = 9 * e + 3 * n - 3 * t - 9 * i, s = 3 * e - 3 * t, l = 0;
        if (wr(o)) {
            if (br(a)) {
                var u = -s / a;
                u >= 0 && 1 >= u && (r[l++] = u)
            }
        } else {
            var h = a * a - 4 * o * s;
            if (wr(h)) r[0] = -a / (2 * o); else if (h > 0) {
                var c = xv(h), u = (-a + c) / (2 * o), d = (-a - c) / (2 * o);
                u >= 0 && 1 >= u && (r[l++] = u), d >= 0 && 1 >= d && (r[l++] = d)
            }
        }
        return l
    }

    function Tr(t, e, i, n, r, a) {
        var o = (e - t) * r + t, s = (i - e) * r + e, l = (n - i) * r + i, u = (s - o) * r + o, h = (l - s) * r + s,
            c = (h - u) * r + u;
        a[0] = t, a[1] = o, a[2] = u, a[3] = c, a[4] = c, a[5] = h, a[6] = l, a[7] = n
    }

    function Dr(t, e, i, n, r, a, o, s, l, u, h) {
        var c, d, f, p, g, m = .005, v = 1 / 0;
        Mv[0] = l, Mv[1] = u;
        for (var y = 0; 1 > y; y += .05) Iv[0] = Sr(t, i, r, o, y), Iv[1] = Sr(e, n, a, s, y), p = hg(Mv, Iv), v > p && (c = y, v = p);
        v = 1 / 0;
        for (var x = 0; 32 > x && !(wv > m); x++) d = c - m, f = c + m, Iv[0] = Sr(t, i, r, o, d), Iv[1] = Sr(e, n, a, s, d), p = hg(Iv, Mv), d >= 0 && v > p ? (c = d, v = p) : (Cv[0] = Sr(t, i, r, o, f), Cv[1] = Sr(e, n, a, s, f), g = hg(Cv, Mv), 1 >= f && v > g ? (c = f, v = g) : m *= .5);
        return h && (h[0] = Sr(t, i, r, o, c), h[1] = Sr(e, n, a, s, c)), xv(v)
    }

    function Ar(t, e, i, n) {
        var r = 1 - n;
        return r * (r * t + 2 * n * e) + n * n * i
    }

    function kr(t, e, i, n) {
        return 2 * ((1 - n) * (e - t) + n * (i - e))
    }

    function Pr(t, e, i, n, r) {
        var a = t - 2 * e + i, o = 2 * (e - t), s = t - n, l = 0;
        if (wr(a)) {
            if (br(o)) {
                var u = -s / o;
                u >= 0 && 1 >= u && (r[l++] = u)
            }
        } else {
            var h = o * o - 4 * a * s;
            if (wr(h)) {
                var u = -o / (2 * a);
                u >= 0 && 1 >= u && (r[l++] = u)
            } else if (h > 0) {
                var c = xv(h), u = (-o + c) / (2 * a), d = (-o - c) / (2 * a);
                u >= 0 && 1 >= u && (r[l++] = u), d >= 0 && 1 >= d && (r[l++] = d)
            }
        }
        return l
    }

    function Lr(t, e, i) {
        var n = t + i - 2 * e;
        return 0 === n ? .5 : (t - e) / n
    }

    function Or(t, e, i, n, r) {
        var a = (e - t) * n + t, o = (i - e) * n + e, s = (o - a) * n + a;
        r[0] = t, r[1] = a, r[2] = s, r[3] = s, r[4] = o, r[5] = i
    }

    function zr(t, e, i, n, r, a, o, s, l) {
        var u, h = .005, c = 1 / 0;
        Mv[0] = o, Mv[1] = s;
        for (var d = 0; 1 > d; d += .05) {
            Iv[0] = Ar(t, i, r, d), Iv[1] = Ar(e, n, a, d);
            var f = hg(Mv, Iv);
            c > f && (u = d, c = f)
        }
        c = 1 / 0;
        for (var p = 0; 32 > p && !(wv > h); p++) {
            var g = u - h, m = u + h;
            Iv[0] = Ar(t, i, r, g), Iv[1] = Ar(e, n, a, g);
            var f = hg(Iv, Mv);
            if (g >= 0 && c > f) u = g, c = f; else {
                Cv[0] = Ar(t, i, r, m), Cv[1] = Ar(e, n, a, m);
                var v = hg(Cv, Mv);
                1 >= m && c > v ? (u = m, c = v) : h *= .5
            }
        }
        return l && (l[0] = Ar(t, i, r, u), l[1] = Ar(e, n, a, u)), xv(c)
    }

    function Br(t, e, i) {
        if (0 !== t.length) {
            var n, r = t[0], a = r[0], o = r[0], s = r[1], l = r[1];
            for (n = 1; n < t.length; n++) r = t[n], a = Tv(a, r[0]), o = Dv(o, r[0]), s = Tv(s, r[1]), l = Dv(l, r[1]);
            e[0] = a, e[1] = s, i[0] = o, i[1] = l
        }
    }

    function Er(t, e, i, n, r, a) {
        r[0] = Tv(t, i), r[1] = Tv(e, n), a[0] = Dv(t, i), a[1] = Dv(e, n)
    }

    function Nr(t, e, i, n, r, a, o, s, l, u) {
        var h, c = Cr, d = Sr, f = c(t, i, r, o, Bv);
        for (l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0, h = 0; f > h; h++) {
            var p = d(t, i, r, o, Bv[h]);
            l[0] = Tv(p, l[0]), u[0] = Dv(p, u[0])
        }
        for (f = c(e, n, a, s, Ev), h = 0; f > h; h++) {
            var g = d(e, n, a, s, Ev[h]);
            l[1] = Tv(g, l[1]), u[1] = Dv(g, u[1])
        }
        l[0] = Tv(t, l[0]), u[0] = Dv(t, u[0]), l[0] = Tv(o, l[0]), u[0] = Dv(o, u[0]), l[1] = Tv(e, l[1]), u[1] = Dv(e, u[1]), l[1] = Tv(s, l[1]), u[1] = Dv(s, u[1])
    }

    function Rr(t, e, i, n, r, a, o, s) {
        var l = Lr, u = Ar, h = Dv(Tv(l(t, i, r), 1), 0), c = Dv(Tv(l(e, n, a), 1), 0), d = u(t, i, r, h),
            f = u(e, n, a, c);
        o[0] = Tv(t, r, d), o[1] = Tv(e, a, f), s[0] = Dv(t, r, d), s[1] = Dv(e, a, f)
    }

    function Fr(t, e, i, n, r, a, o, s, l) {
        var u = oe, h = se, c = Math.abs(r - a);
        if (1e-4 > c % Pv && c > 1e-4) return s[0] = t - i, s[1] = e - n, l[0] = t + i, void (l[1] = e + n);
        if (Lv[0] = kv(r) * i + t, Lv[1] = Av(r) * n + e, Ov[0] = kv(a) * i + t, Ov[1] = Av(a) * n + e, u(s, Lv, Ov), h(l, Lv, Ov), r %= Pv, 0 > r && (r += Pv), a %= Pv, 0 > a && (a += Pv), r > a && !o ? a += Pv : a > r && o && (r += Pv), o) {
            var d = a;
            a = r, r = d
        }
        for (var f = 0; a > f; f += Math.PI / 2) f > r && (zv[0] = kv(f) * i + t, zv[1] = Av(f) * n + e, u(s, zv, s), h(l, zv, l))
    }

    function Vr(t, e, i, n, r, a, o) {
        if (0 === r) return !1;
        var s = r, l = 0, u = t;
        if (o > e + s && o > n + s || e - s > o && n - s > o || a > t + s && a > i + s || t - s > a && i - s > a) return !1;
        if (t === i) return Math.abs(a - t) <= s / 2;
        l = (e - n) / (t - i), u = (t * n - i * e) / (t - i);
        var h = l * a - o + u, c = h * h / (l * l + 1);
        return s / 2 * s / 2 >= c
    }

    function Gr(t, e, i, n, r, a, o, s, l, u, h) {
        if (0 === l) return !1;
        var c = l;
        if (h > e + c && h > n + c && h > a + c && h > s + c || e - c > h && n - c > h && a - c > h && s - c > h || u > t + c && u > i + c && u > r + c && u > o + c || t - c > u && i - c > u && r - c > u && o - c > u) return !1;
        var d = Dr(t, e, i, n, r, a, o, s, u, h, null);
        return c / 2 >= d
    }

    function Hr(t, e, i, n, r, a, o, s, l) {
        if (0 === o) return !1;
        var u = o;
        if (l > e + u && l > n + u && l > a + u || e - u > l && n - u > l && a - u > l || s > t + u && s > i + u && s > r + u || t - u > s && i - u > s && r - u > s) return !1;
        var h = zr(t, e, i, n, r, a, s, l, null);
        return u / 2 >= h
    }

    function Wr(t) {
        return t %= Kv, 0 > t && (t += Kv), t
    }

    function Xr(t, e, i, n, r, a, o, s, l) {
        if (0 === o) return !1;
        var u = o;
        s -= t, l -= e;
        var h = Math.sqrt(s * s + l * l);
        if (h - u > i || i > h + u) return !1;
        if (Math.abs(n - r) % $v < 1e-4) return !0;
        if (a) {
            var c = n;
            n = Wr(r), r = Wr(c)
        } else n = Wr(n), r = Wr(r);
        n > r && (r += $v);
        var d = Math.atan2(l, s);
        return 0 > d && (d += $v), d >= n && r >= d || d + $v >= n && r >= d + $v
    }

    function Ur(t, e, i, n, r, a) {
        if (a > e && a > n || e > a && n > a) return 0;
        if (n === e) return 0;
        var o = e > n ? 1 : -1, s = (a - e) / (n - e);
        (1 === s || 0 === s) && (o = e > n ? .5 : -.5);
        var l = s * (i - t) + t;
        return l === r ? 1 / 0 : l > r ? o : 0
    }

    function Yr(t, e) {
        return Math.abs(t - e) < ty
    }

    function qr() {
        var t = iy[0];
        iy[0] = iy[1], iy[1] = t
    }

    function jr(t, e, i, n, r, a, o, s, l, u) {
        if (u > e && u > n && u > a && u > s || e > u && n > u && a > u && s > u) return 0;
        var h = Ir(e, n, a, s, u, ey);
        if (0 === h) return 0;
        for (var c, d, f = 0, p = -1, g = 0; h > g; g++) {
            var m = ey[g], v = 0 === m || 1 === m ? .5 : 1, y = Sr(t, i, r, o, m);
            l > y || (0 > p && (p = Cr(e, n, a, s, iy), iy[1] < iy[0] && p > 1 && qr(), c = Sr(e, n, a, s, iy[0]), p > 1 && (d = Sr(e, n, a, s, iy[1]))), f += 2 === p ? m < iy[0] ? e > c ? v : -v : m < iy[1] ? c > d ? v : -v : d > s ? v : -v : m < iy[0] ? e > c ? v : -v : c > s ? v : -v)
        }
        return f
    }

    function Zr(t, e, i, n, r, a, o, s) {
        if (s > e && s > n && s > a || e > s && n > s && a > s) return 0;
        var l = Pr(e, n, a, s, ey);
        if (0 === l) return 0;
        var u = Lr(e, n, a);
        if (u >= 0 && 1 >= u) {
            for (var h = 0, c = Ar(e, n, a, u), d = 0; l > d; d++) {
                var f = 0 === ey[d] || 1 === ey[d] ? .5 : 1, p = Ar(t, i, r, ey[d]);
                o > p || (h += ey[d] < u ? e > c ? f : -f : c > a ? f : -f)
            }
            return h
        }
        var f = 0 === ey[0] || 1 === ey[0] ? .5 : 1, p = Ar(t, i, r, ey[0]);
        return o > p ? 0 : e > a ? f : -f
    }

    function Kr(t, e, i, n, r, a, o, s) {
        if (s -= e, s > i || -i > s) return 0;
        var l = Math.sqrt(i * i - s * s);
        ey[0] = -l, ey[1] = l;
        var u = Math.abs(n - r);
        if (1e-4 > u) return 0;
        if (1e-4 > u % Jv) {
            n = 0, r = Jv;
            var h = a ? 1 : -1;
            return o >= ey[0] + t && o <= ey[1] + t ? h : 0
        }
        if (a) {
            var l = n;
            n = Wr(r), r = Wr(l)
        } else n = Wr(n), r = Wr(r);
        n > r && (r += Jv);
        for (var c = 0, d = 0; 2 > d; d++) {
            var f = ey[d];
            if (f + t > o) {
                var p = Math.atan2(s, f), h = a ? 1 : -1;
                0 > p && (p = Jv + p), (p >= n && r >= p || p + Jv >= n && r >= p + Jv) && (p > Math.PI / 2 && p < 1.5 * Math.PI && (h = -h), c += h)
            }
        }
        return c
    }

    function $r(t, e, i, n, r) {
        for (var a = 0, o = 0, s = 0, l = 0, u = 0, h = 0; h < t.length;) {
            var c = t[h++];
            switch (c === Qv.M && h > 1 && (i || (a += Ur(o, s, l, u, n, r))), 1 === h && (o = t[h], s = t[h + 1], l = o, u = s), c) {
                case Qv.M:
                    l = t[h++], u = t[h++], o = l, s = u;
                    break;
                case Qv.L:
                    if (i) {
                        if (Vr(o, s, t[h], t[h + 1], e, n, r)) return !0
                    } else a += Ur(o, s, t[h], t[h + 1], n, r) || 0;
                    o = t[h++], s = t[h++];
                    break;
                case Qv.C:
                    if (i) {
                        if (Gr(o, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], e, n, r)) return !0
                    } else a += jr(o, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], n, r) || 0;
                    o = t[h++], s = t[h++];
                    break;
                case Qv.Q:
                    if (i) {
                        if (Hr(o, s, t[h++], t[h++], t[h], t[h + 1], e, n, r)) return !0
                    } else a += Zr(o, s, t[h++], t[h++], t[h], t[h + 1], n, r) || 0;
                    o = t[h++], s = t[h++];
                    break;
                case Qv.A:
                    var d = t[h++], f = t[h++], p = t[h++], g = t[h++], m = t[h++], v = t[h++];
                    h += 1;
                    var y = 1 - t[h++], x = Math.cos(m) * p + d, _ = Math.sin(m) * g + f;
                    h > 1 ? a += Ur(o, s, x, _, n, r) : (l = x, u = _);
                    var w = (n - d) * g / p + d;
                    if (i) {
                        if (Xr(d, f, g, m, m + v, y, e, w, r)) return !0
                    } else a += Kr(d, f, g, m, m + v, y, w, r);
                    o = Math.cos(m + v) * p + d, s = Math.sin(m + v) * g + f;
                    break;
                case Qv.R:
                    l = o = t[h++], u = s = t[h++];
                    var b = t[h++], S = t[h++], x = l + b, _ = u + S;
                    if (i) {
                        if (Vr(l, u, x, u, e, n, r) || Vr(x, u, x, _, e, n, r) || Vr(x, _, l, _, e, n, r) || Vr(l, _, l, u, e, n, r)) return !0
                    } else a += Ur(x, u, x, _, n, r), a += Ur(l, _, l, u, n, r);
                    break;
                case Qv.Z:
                    if (i) {
                        if (Vr(o, s, l, u, e, n, r)) return !0
                    } else a += Ur(o, s, l, u, n, r);
                    o = l, s = u
            }
        }
        return i || Yr(s, u) || (a += Ur(o, s, l, u, n, r) || 0), 0 !== a
    }

    function Qr(t, e, i) {
        return $r(t, 0, !1, e, i)
    }

    function Jr(t, e, i, n) {
        return $r(t, e, !0, i, n)
    }

    function ta(t) {
        Cn.call(this, t), this.path = null
    }

    function ea(t, e, i, n, r, a, o, s, l, u, h) {
        var c = l * (py / 180), d = fy(c) * (t - i) / 2 + dy(c) * (e - n) / 2,
            f = -1 * dy(c) * (t - i) / 2 + fy(c) * (e - n) / 2, p = d * d / (o * o) + f * f / (s * s);
        p > 1 && (o *= cy(p), s *= cy(p));
        var g = (r === a ? -1 : 1) * cy((o * o * s * s - o * o * f * f - s * s * d * d) / (o * o * f * f + s * s * d * d)) || 0,
            m = g * o * f / s, v = g * -s * d / o, y = (t + i) / 2 + fy(c) * m - dy(c) * v,
            x = (e + n) / 2 + dy(c) * m + fy(c) * v, _ = vy([1, 0], [(d - m) / o, (f - v) / s]),
            w = [(d - m) / o, (f - v) / s], b = [(-1 * d - m) / o, (-1 * f - v) / s], S = vy(w, b);
        my(w, b) <= -1 && (S = py), my(w, b) >= 1 && (S = 0), 0 === a && S > 0 && (S -= 2 * py), 1 === a && 0 > S && (S += 2 * py), h.addData(u, y, x, o, s, _, S, c, a)
    }

    function ia(t) {
        if (!t) return new Zv;
        for (var e, i = 0, n = 0, r = i, a = n, o = new Zv, s = Zv.CMD, l = t.match(yy), u = 0; u < l.length; u++) {
            for (var h, c = l[u], d = c.charAt(0), f = c.match(xy) || [], p = f.length, g = 0; p > g; g++) f[g] = parseFloat(f[g]);
            for (var m = 0; p > m;) {
                var v, y, x, _, w, b, S, M = i, I = n;
                switch (d) {
                    case"l":
                        i += f[m++], n += f[m++], h = s.L, o.addData(h, i, n);
                        break;
                    case"L":
                        i = f[m++], n = f[m++], h = s.L, o.addData(h, i, n);
                        break;
                    case"m":
                        i += f[m++], n += f[m++], h = s.M, o.addData(h, i, n), r = i, a = n, d = "l";
                        break;
                    case"M":
                        i = f[m++], n = f[m++], h = s.M, o.addData(h, i, n), r = i, a = n, d = "L";
                        break;
                    case"h":
                        i += f[m++], h = s.L, o.addData(h, i, n);
                        break;
                    case"H":
                        i = f[m++], h = s.L, o.addData(h, i, n);
                        break;
                    case"v":
                        n += f[m++], h = s.L, o.addData(h, i, n);
                        break;
                    case"V":
                        n = f[m++], h = s.L, o.addData(h, i, n);
                        break;
                    case"C":
                        h = s.C, o.addData(h, f[m++], f[m++], f[m++], f[m++], f[m++], f[m++]), i = f[m - 2], n = f[m - 1];
                        break;
                    case"c":
                        h = s.C, o.addData(h, f[m++] + i, f[m++] + n, f[m++] + i, f[m++] + n, f[m++] + i, f[m++] + n), i += f[m - 2], n += f[m - 1];
                        break;
                    case"S":
                        v = i, y = n;
                        var C = o.len(), T = o.data;
                        e === s.C && (v += i - T[C - 4], y += n - T[C - 3]), h = s.C, M = f[m++], I = f[m++], i = f[m++], n = f[m++], o.addData(h, v, y, M, I, i, n);
                        break;
                    case"s":
                        v = i, y = n;
                        var C = o.len(), T = o.data;
                        e === s.C && (v += i - T[C - 4], y += n - T[C - 3]), h = s.C, M = i + f[m++], I = n + f[m++], i += f[m++], n += f[m++], o.addData(h, v, y, M, I, i, n);
                        break;
                    case"Q":
                        M = f[m++], I = f[m++], i = f[m++], n = f[m++], h = s.Q, o.addData(h, M, I, i, n);
                        break;
                    case"q":
                        M = f[m++] + i, I = f[m++] + n, i += f[m++], n += f[m++], h = s.Q, o.addData(h, M, I, i, n);
                        break;
                    case"T":
                        v = i, y = n;
                        var C = o.len(), T = o.data;
                        e === s.Q && (v += i - T[C - 4], y += n - T[C - 3]), i = f[m++], n = f[m++], h = s.Q, o.addData(h, v, y, i, n);
                        break;
                    case"t":
                        v = i, y = n;
                        var C = o.len(), T = o.data;
                        e === s.Q && (v += i - T[C - 4], y += n - T[C - 3]), i += f[m++], n += f[m++], h = s.Q, o.addData(h, v, y, i, n);
                        break;
                    case"A":
                        x = f[m++], _ = f[m++], w = f[m++], b = f[m++], S = f[m++], M = i, I = n, i = f[m++], n = f[m++], h = s.A, ea(M, I, i, n, b, S, x, _, w, h, o);
                        break;
                    case"a":
                        x = f[m++], _ = f[m++], w = f[m++], b = f[m++], S = f[m++], M = i, I = n, i += f[m++], n += f[m++], h = s.A, ea(M, I, i, n, b, S, x, _, w, h, o)
                }
            }
            ("z" === d || "Z" === d) && (h = s.Z, o.addData(h), i = r, n = a), e = h
        }
        return o.toStatic(), o
    }

    function na(t, e) {
        var i = ia(t);
        return e = e || {}, e.buildPath = function (t) {
            if (t.setData) {
                t.setData(i.data);
                var e = t.getContext();
                e && t.rebuildPath(e)
            } else {
                var e = t;
                i.rebuildPath(e)
            }
        }, e.applyTransform = function (t) {
            hy(i, t), this.dirty(!0)
        }, e
    }

    function ra(t, e) {
        return new ta(na(t, e))
    }

    function aa(t, e) {
        return ta.extend(na(t, e))
    }

    function oa(t, e) {
        for (var i = [], n = t.length, r = 0; n > r; r++) {
            var a = t[r];
            a.path || a.createPathProxy(), a.__dirtyPath && a.buildPath(a.path, a.shape, !0), i.push(a.path)
        }
        var o = new ta(e);
        return o.createPathProxy(), o.buildPath = function (t) {
            t.appendPath(i);
            var e = t.getContext();
            e && t.rebuildPath(e)
        }, o
    }

    function sa(t, e, i, n, r, a, o) {
        var s = .5 * (i - t), l = .5 * (n - e);
        return (2 * (e - i) + s + l) * o + (-3 * (e - i) - 2 * s - l) * a + s * r + e
    }

    function la(t, e, i) {
        var n = e.points, r = e.smooth;
        if (n && n.length >= 2) {
            if (r && "spline" !== r) {
                var a = Ty(n, r, i, e.smoothConstraint);
                t.moveTo(n[0][0], n[0][1]);
                for (var o = n.length, s = 0; (i ? o : o - 1) > s; s++) {
                    var l = a[2 * s], u = a[2 * s + 1], h = n[(s + 1) % o];
                    t.bezierCurveTo(l[0], l[1], u[0], u[1], h[0], h[1])
                }
            } else {
                "spline" === r && (n = Cy(n, i)), t.moveTo(n[0][0], n[0][1]);
                for (var s = 1, c = n.length; c > s; s++) t.lineTo(n[s][0], n[s][1])
            }
            i && t.closePath()
        }
    }

    function ua(t, e, i) {
        if (e) {
            var n = e.x1, r = e.x2, a = e.y1, o = e.y2;
            t.x1 = n, t.x2 = r, t.y1 = a, t.y2 = o;
            var s = i && i.lineWidth;
            s && (ky(2 * n) === ky(2 * r) && (t.x1 = t.x2 = ca(n, s, !0)), ky(2 * a) === ky(2 * o) && (t.y1 = t.y2 = ca(a, s, !0)))
        }
    }

    function ha(t, e, i) {
        if (e) {
            var n = e.x, r = e.y, a = e.width, o = e.height;
            t.x = n, t.y = r, t.width = a, t.height = o;
            var s = i && i.lineWidth;
            s && (t.x = ca(n, s, !0), t.y = ca(r, s, !0), t.width = Math.max(ca(n + a, s, !1) - t.x, 0 === a ? 0 : 1), t.height = Math.max(ca(r + o, s, !1) - t.y, 0 === o ? 0 : 1))
        }
    }

    function ca(t, e, i) {
        if (!e) return t;
        var n = ky(2 * t);
        return (n + ky(e)) % 2 === 0 ? n / 2 : (n + (i ? 1 : -1)) / 2
    }

    function da(t, e, i) {
        var n = t.cpx2, r = t.cpy2;
        return null === n || null === r ? [(i ? Mr : Sr)(t.x1, t.cpx1, t.cpx2, t.x2, e), (i ? Mr : Sr)(t.y1, t.cpy1, t.cpy2, t.y2, e)] : [(i ? kr : Ar)(t.x1, t.cpx1, t.x2, e), (i ? kr : Ar)(t.y1, t.cpy1, t.y2, e)]
    }

    function fa(t) {
        Cn.call(this, t), this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.notClear = !0
    }

    function pa(t) {
        return ta.extend(t)
    }

    function ga(t, e) {
        return aa(t, e)
    }

    function ma(t, e) {
        Qy[t] = e
    }

    function va(t) {
        return Qy.hasOwnProperty(t) ? Qy[t] : void 0
    }

    function ya(t, e, i, n) {
        var r = ra(t, e);
        return i && ("center" === n && (i = _a(i, r.getBoundingRect())), wa(r, i)), r
    }

    function xa(t, e, i) {
        var n = new Tn({
            style: {image: t, x: e.x, y: e.y, width: e.width, height: e.height}, onload: function (t) {
                if ("center" === i) {
                    var r = {width: t.width, height: t.height};
                    n.setStyle(_a(e, r))
                }
            }
        });
        return n
    }

    function _a(t, e) {
        var i, n = e.width / e.height, r = t.height * n;
        r <= t.width ? i = t.height : (r = t.width, i = r / n);
        var a = t.x + t.width / 2, o = t.y + t.height / 2;
        return {x: a - r / 2, y: o - i / 2, width: r, height: i}
    }

    function wa(t, e) {
        if (t.applyTransform) {
            var i = t.getBoundingRect(), n = i.calculateTransform(e);
            t.applyTransform(n)
        }
    }

    function ba(t) {
        return ua(t.shape, t.shape, t.style), t
    }

    function Sa(t) {
        return ha(t.shape, t.shape, t.style), t
    }

    function Ma(t) {
        return null != t && "none" !== t
    }

    function Ia(t) {
        if ("string" != typeof t) return t;
        var e = ex.get(t);
        return e || (e = ii(t, -.1), 1e4 > ix && (ex.set(t, e), ix++)), e
    }

    function Ca(t) {
        if (t.__hoverStlDirty) {
            t.__hoverStlDirty = !1;
            var e = t.__hoverStl;
            if (!e) return void (t.__cachedNormalStl = t.__cachedNormalZ2 = null);
            var i = t.__cachedNormalStl = {};
            t.__cachedNormalZ2 = t.z2;
            var n = t.style;
            for (var r in e) null != e[r] && (i[r] = n[r]);
            i.fill = n.fill, i.stroke = n.stroke
        }
    }

    function Ta(t) {
        var e = t.__hoverStl;
        if (e && !t.__highlighted) {
            var i = t.__zr, n = t.useHoverLayer && i && "canvas" === i.painter.type;
            if (t.__highlighted = n ? "layer" : "plain", !(t.isGroup || !i && t.useHoverLayer)) {
                var r = t, a = t.style;
                n && (r = i.addHover(t), a = r.style), Ka(a), n || Ca(r), a.extendFrom(e), Da(a, e, "fill"), Da(a, e, "stroke"), Za(a), n || (t.dirty(!1), t.z2 += Yy)
            }
        }
    }

    function Da(t, e, i) {
        !Ma(e[i]) && Ma(t[i]) && (t[i] = Ia(t[i]))
    }

    function Aa(t) {
        var e = t.__highlighted;
        if (e && (t.__highlighted = !1, !t.isGroup)) if ("layer" === e) t.__zr && t.__zr.removeHover(t); else {
            var i = t.style, n = t.__cachedNormalStl;
            n && (Ka(i), t.setStyle(n), Za(i));
            var r = t.__cachedNormalZ2;
            null != r && t.z2 - r === Yy && (t.z2 = r)
        }
    }

    function ka(t, e, i) {
        var n, r = Zy, a = Zy;
        t.__highlighted && (r = jy, n = !0), e(t, i), t.__highlighted && (a = jy, n = !0), t.isGroup && t.traverse(function (t) {
            !t.isGroup && e(t, i)
        }), n && t.__highDownOnUpdate && t.__highDownOnUpdate(r, a)
    }

    function Pa(t, e) {
        e = t.__hoverStl = e !== !1 && (t.hoverStyle || e || {}), t.__hoverStlDirty = !0, t.__highlighted && (t.__cachedNormalStl = null, Aa(t), Ta(t))
    }

    function La(t) {
        !Ea(this, t) && !this.__highByOuter && ka(this, Ta)
    }

    function Oa(t) {
        !Ea(this, t) && !this.__highByOuter && ka(this, Aa)
    }

    function za(t) {
        this.__highByOuter |= 1 << (t || 0), ka(this, Ta)
    }

    function Ba(t) {
        !(this.__highByOuter &= ~(1 << (t || 0))) && ka(this, Aa)
    }

    function Ea(t, e) {
        return t.__highDownSilentOnTouch && e.zrByTouch
    }

    function Na(t, e) {
        Ra(t, !0), ka(t, Pa, e)
    }

    function Ra(t, e) {
        var i = e === !1;
        if (t.__highDownSilentOnTouch = t.highDownSilentOnTouch, t.__highDownOnUpdate = t.highDownOnUpdate, !i || t.__highDownDispatcher) {
            var n = i ? "off" : "on";
            t[n]("mouseover", La)[n]("mouseout", Oa), t[n]("emphasis", za)[n]("normal", Ba), t.__highByOuter = t.__highByOuter || 0, t.__highDownDispatcher = !i
        }
    }

    function Fa(t) {
        return !(!t || !t.__highDownDispatcher)
    }

    function Va(t) {
        var e = $y[t];
        return null == e && 32 >= Ky && (e = $y[t] = Ky++), e
    }

    function Ga(t, e, i, n, r, a, o) {
        r = r || Uy;
        var s, l = r.labelFetcher, u = r.labelDataIndex, h = r.labelDimIndex, c = r.labelProp, d = i.getShallow("show"),
            f = n.getShallow("show");
        (d || f) && (l && (s = l.getFormattedLabel(u, "normal", null, h, c)), null == s && (s = w(r.defaultText) ? r.defaultText(u, r) : r.defaultText));
        var p = d ? s : null, g = f ? A(l ? l.getFormattedLabel(u, "emphasis", null, h, c) : null, s) : null;
        (null != p || null != g) && (Wa(t, i, a, r), Wa(e, n, o, r, !0)), t.text = p, e.text = g
    }

    function Ha(t, e, i) {
        var n = t.style;
        e && (Ka(n), t.setStyle(e), Za(n)), n = t.__hoverStl, i && n && (Ka(n), o(n, i), Za(n))
    }

    function Wa(t, e, i, n, r) {
        return Ua(t, e, n, r), i && o(t, i), t
    }

    function Xa(t, e, i) {
        var n, r = {isRectText: !0};
        i === !1 ? n = !0 : r.autoColor = i, Ua(t, e, r, n)
    }

    function Ua(t, e, i, n) {
        if (i = i || Uy, i.isRectText) {
            var r;
            i.getTextPosition ? r = i.getTextPosition(e, n) : (r = e.getShallow("position") || (n ? null : "inside"), "outside" === r && (r = "top")), t.textPosition = r, t.textOffset = e.getShallow("offset");
            var a = e.getShallow("rotate");
            null != a && (a *= Math.PI / 180), t.textRotation = a, t.textDistance = A(e.getShallow("distance"), n ? null : 5)
        }
        var o, s = e.ecModel, l = s && s.option.textStyle, u = Ya(e);
        if (u) {
            o = {};
            for (var h in u) if (u.hasOwnProperty(h)) {
                var c = e.getModel(["rich", h]);
                qa(o[h] = {}, c, l, i, n)
            }
        }
        return t.rich = o, qa(t, e, l, i, n, !0), i.forceRich && !i.textStyle && (i.textStyle = {}), t
    }

    function Ya(t) {
        for (var e; t && t !== t.ecModel;) {
            var i = (t.option || Uy).rich;
            if (i) {
                e = e || {};
                for (var n in i) i.hasOwnProperty(n) && (e[n] = 1)
            }
            t = t.parentModel
        }
        return e
    }

    function qa(t, e, i, n, r, a) {
        i = !r && i || Uy, t.textFill = ja(e.getShallow("color"), n) || i.color, t.textStroke = ja(e.getShallow("textBorderColor"), n) || i.textBorderColor, t.textStrokeWidth = A(e.getShallow("textBorderWidth"), i.textBorderWidth), r || (a && (t.insideRollbackOpt = n, Za(t)), null == t.textFill && (t.textFill = n.autoColor)), t.fontStyle = e.getShallow("fontStyle") || i.fontStyle, t.fontWeight = e.getShallow("fontWeight") || i.fontWeight, t.fontSize = e.getShallow("fontSize") || i.fontSize, t.fontFamily = e.getShallow("fontFamily") || i.fontFamily, t.textAlign = e.getShallow("align"), t.textVerticalAlign = e.getShallow("verticalAlign") || e.getShallow("baseline"), t.textLineHeight = e.getShallow("lineHeight"), t.textWidth = e.getShallow("width"), t.textHeight = e.getShallow("height"), t.textTag = e.getShallow("tag"), a && n.disableBox || (t.textBackgroundColor = ja(e.getShallow("backgroundColor"), n), t.textPadding = e.getShallow("padding"), t.textBorderColor = ja(e.getShallow("borderColor"), n), t.textBorderWidth = e.getShallow("borderWidth"), t.textBorderRadius = e.getShallow("borderRadius"), t.textBoxShadowColor = e.getShallow("shadowColor"), t.textBoxShadowBlur = e.getShallow("shadowBlur"), t.textBoxShadowOffsetX = e.getShallow("shadowOffsetX"), t.textBoxShadowOffsetY = e.getShallow("shadowOffsetY")), t.textShadowColor = e.getShallow("textShadowColor") || i.textShadowColor, t.textShadowBlur = e.getShallow("textShadowBlur") || i.textShadowBlur, t.textShadowOffsetX = e.getShallow("textShadowOffsetX") || i.textShadowOffsetX, t.textShadowOffsetY = e.getShallow("textShadowOffsetY") || i.textShadowOffsetY
    }

    function ja(t, e) {
        return "auto" !== t ? t : e && e.autoColor ? e.autoColor : null
    }

    function Za(t) {
        var e, i = t.textPosition, n = t.insideRollbackOpt;
        if (n && null == t.textFill) {
            var r = n.autoColor, a = n.isRectText, o = n.useInsideStyle,
                s = o !== !1 && (o === !0 || a && i && "string" == typeof i && i.indexOf("inside") >= 0),
                l = !s && null != r;
            (s || l) && (e = {
                textFill: t.textFill,
                textStroke: t.textStroke,
                textStrokeWidth: t.textStrokeWidth
            }), s && (t.textFill = "#fff", null == t.textStroke && (t.textStroke = r, null == t.textStrokeWidth && (t.textStrokeWidth = 2))), l && (t.textFill = r)
        }
        t.insideRollback = e
    }

    function Ka(t) {
        var e = t.insideRollback;
        e && (t.textFill = e.textFill, t.textStroke = e.textStroke, t.textStrokeWidth = e.textStrokeWidth, t.insideRollback = null)
    }

    function $a(t, e) {
        var i = e && e.getModel("textStyle");
        return z([t.fontStyle || i && i.getShallow("fontStyle") || "", t.fontWeight || i && i.getShallow("fontWeight") || "", (t.fontSize || i && i.getShallow("fontSize") || 12) + "px", t.fontFamily || i && i.getShallow("fontFamily") || "sans-serif"].join(" "))
    }

    function Qa(t, e, i, n, r, a) {
        "function" == typeof r && (a = r, r = null);
        var o = n && n.isAnimationEnabled();
        if (o) {
            var s = t ? "Update" : "", l = n.getShallow("animationDuration" + s),
                u = n.getShallow("animationEasing" + s), h = n.getShallow("animationDelay" + s);
            "function" == typeof h && (h = h(r, n.getAnimationDelayParams ? n.getAnimationDelayParams(e, r) : null)), "function" == typeof l && (l = l(r)), l > 0 ? e.animateTo(i, l, h || 0, u, a, !!a) : (e.stopAnimation(), e.attr(i), a && a())
        } else e.stopAnimation(), e.attr(i), a && a()
    }

    function Ja(t, e, i, n, r) {
        Qa(!0, t, e, i, n, r)
    }

    function to(t, e, i, n, r) {
        Qa(!1, t, e, i, n, r)
    }

    function eo(t, e) {
        for (var i = Oe([]); t && t !== e;) Be(i, t.getLocalTransform(), i), t = t.parent;
        return i
    }

    function io(t, e, i) {
        return e && !d(e) && (e = kg.getLocalTransform(e)), i && (e = Fe([], e)), ae([], t, e)
    }

    function no(t, e, i) {
        var n = 0 === e[4] || 0 === e[5] || 0 === e[0] ? 1 : Math.abs(2 * e[4] / e[0]),
            r = 0 === e[4] || 0 === e[5] || 0 === e[2] ? 1 : Math.abs(2 * e[4] / e[2]),
            a = ["left" === t ? -n : "right" === t ? n : 0, "top" === t ? -r : "bottom" === t ? r : 0];
        return a = io(a, e, i), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top"
    }

    function ro(t, e, i) {
        function n(t) {
            var e = {};
            return t.traverse(function (t) {
                !t.isGroup && t.anid && (e[t.anid] = t)
            }), e
        }

        function r(t) {
            var e = {position: W(t.position), rotation: t.rotation};
            return t.shape && (e.shape = o({}, t.shape)), e
        }

        if (t && e) {
            var a = n(t);
            e.traverse(function (t) {
                if (!t.isGroup && t.anid) {
                    var e = a[t.anid];
                    if (e) {
                        var n = r(t);
                        t.attr(r(e)), Ja(t, n, i, t.dataIndex)
                    }
                }
            })
        }
    }

    function ao(t, e) {
        return p(t, function (t) {
            var i = t[0];
            i = Wy(i, e.x), i = Xy(i, e.x + e.width);
            var n = t[1];
            return n = Wy(n, e.y), n = Xy(n, e.y + e.height), [i, n]
        })
    }

    function oo(t, e) {
        var i = Wy(t.x, e.x), n = Xy(t.x + t.width, e.x + e.width), r = Wy(t.y, e.y),
            a = Xy(t.y + t.height, e.y + e.height);
        return n >= i && a >= r ? {x: i, y: r, width: n - i, height: a - r} : void 0
    }

    function so(t, e, i) {
        e = o({rectHover: !0}, e);
        var n = e.style = {strokeNoScale: !0};
        return i = i || {
            x: -1,
            y: -1,
            width: 2,
            height: 2
        }, t ? 0 === t.indexOf("image://") ? (n.image = t.slice(8), s(n, i), new Tn(e)) : ya(t.replace("path://", ""), e, i, "center") : void 0
    }

    function lo(t, e, i, n, r) {
        for (var a = 0, o = r[r.length - 1]; a < r.length; a++) {
            var s = r[a];
            if (uo(t, e, i, n, s[0], s[1], o[0], o[1])) return !0;
            o = s
        }
    }

    function uo(t, e, i, n, r, a, o, s) {
        var l = i - t, u = n - e, h = o - r, c = s - a, d = ho(h, c, l, u);
        if (co(d)) return !1;
        var f = t - r, p = e - a, g = ho(f, p, l, u) / d;
        if (0 > g || g > 1) return !1;
        var m = ho(f, p, h, c) / d;
        return 0 > m || m > 1 ? !1 : !0
    }

    function ho(t, e, i, n) {
        return t * n - i * e
    }

    function co(t) {
        return 1e-6 >= t && t >= -1e-6
    }

    function fo(t, e, i) {
        this.parentModel = e, this.ecModel = i, this.option = t
    }

    function po(t, e, i) {
        for (var n = 0; n < e.length && (!e[n] || (t = t && "object" == typeof t ? t[e[n]] : null, null != t)); n++) ;
        return null == t && i && (t = i.get(e)), t
    }

    function go(t, e) {
        var i = ux(t).getParent;
        return i ? i.call(t, e) : t.parentModel
    }

    function mo(t) {
        return [t || "", hx++, Math.random().toFixed(5)].join("_")
    }

    function vo(t) {
        var e = {};
        return t.registerSubTypeDefaulter = function (t, i) {
            t = pr(t), e[t.main] = i
        }, t.determineSubType = function (i, n) {
            var r = n.type;
            if (!r) {
                var a = pr(i).main;
                t.hasSubTypes(i) && e[a] && (r = e[a](n))
            }
            return r
        }, t
    }

    function yo(t, e) {
        function i(t) {
            var i = {}, a = [];
            return f(t, function (o) {
                var s = n(i, o), l = s.originalDeps = e(o), h = r(l, t);
                s.entryCount = h.length, 0 === s.entryCount && a.push(o), f(h, function (t) {
                    u(s.predecessor, t) < 0 && s.predecessor.push(t);
                    var e = n(i, t);
                    u(e.successor, t) < 0 && e.successor.push(o)
                })
            }), {graph: i, noEntryList: a}
        }

        function n(t, e) {
            return t[e] || (t[e] = {predecessor: [], successor: []}), t[e]
        }

        function r(t, e) {
            var i = [];
            return f(t, function (t) {
                u(e, t) >= 0 && i.push(t)
            }), i
        }

        t.topologicalTravel = function (t, e, n, r) {
            function a(t) {
                l[t].entryCount--, 0 === l[t].entryCount && u.push(t)
            }

            function o(t) {
                h[t] = !0, a(t)
            }

            if (t.length) {
                var s = i(e), l = s.graph, u = s.noEntryList, h = {};
                for (f(t, function (t) {
                    h[t] = !0
                }); u.length;) {
                    var c = u.pop(), d = l[c], p = !!h[c];
                    p && (n.call(r, c, d.originalDeps.slice()), delete h[c]), f(d.successor, p ? o : a)
                }
                f(h, function () {
                    throw new Error("Circle dependency may exists")
                })
            }
        }
    }

    function xo(t) {
        return t.replace(/^\s+|\s+$/g, "")
    }

    function _o(t, e, i, n) {
        var r = e[1] - e[0], a = i[1] - i[0];
        if (0 === r) return 0 === a ? i[0] : (i[0] + i[1]) / 2;
        if (n) if (r > 0) {
            if (t <= e[0]) return i[0];
            if (t >= e[1]) return i[1]
        } else {
            if (t >= e[0]) return i[0];
            if (t <= e[1]) return i[1]
        } else {
            if (t === e[0]) return i[0];
            if (t === e[1]) return i[1]
        }
        return (t - e[0]) / r * a + i[0]
    }

    function wo(t, e) {
        switch (t) {
            case"center":
            case"middle":
                t = "50%";
                break;
            case"left":
            case"top":
                t = "0%";
                break;
            case"right":
            case"bottom":
                t = "100%"
        }
        return "string" == typeof t ? xo(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : null == t ? 0 / 0 : +t
    }

    function bo(t, e, i) {
        return null == e && (e = 10), e = Math.min(Math.max(0, e), 20), t = (+t).toFixed(e), i ? t : +t
    }

    function So(t) {
        return t.sort(function (t, e) {
            return t - e
        }), t
    }

    function Mo(t) {
        if (t = +t, isNaN(t)) return 0;
        for (var e = 1, i = 0; Math.round(t * e) / e !== t;) e *= 10, i++;
        return i
    }

    function Io(t) {
        var e = t.toString(), i = e.indexOf("e");
        if (i > 0) {
            var n = +e.slice(i + 1);
            return 0 > n ? -n : 0
        }
        var r = e.indexOf(".");
        return 0 > r ? 0 : e.length - 1 - r
    }

    function Co(t, e) {
        var i = Math.log, n = Math.LN10, r = Math.floor(i(t[1] - t[0]) / n),
            a = Math.round(i(Math.abs(e[1] - e[0])) / n), o = Math.min(Math.max(-r + a, 0), 20);
        return isFinite(o) ? o : 20
    }

    function To(t, e, i) {
        if (!t[e]) return 0;
        var n = g(t, function (t, e) {
            return t + (isNaN(e) ? 0 : e)
        }, 0);
        if (0 === n) return 0;
        for (var r = Math.pow(10, i), a = p(t, function (t) {
            return (isNaN(t) ? 0 : t) / n * r * 100
        }), o = 100 * r, s = p(a, function (t) {
            return Math.floor(t)
        }), l = g(s, function (t, e) {
            return t + e
        }, 0), u = p(a, function (t, e) {
            return t - s[e]
        }); o > l;) {
            for (var h = Number.NEGATIVE_INFINITY, c = null, d = 0, f = u.length; f > d; ++d) u[d] > h && (h = u[d], c = d);
            ++s[c], u[c] = 0, ++l
        }
        return s[e] / r
    }

    function Do(t) {
        var e = 2 * Math.PI;
        return (t % e + e) % e
    }

    function Ao(t) {
        return t > -cx && cx > t
    }

    function ko(t) {
        if (t instanceof Date) return t;
        if ("string" == typeof t) {
            var e = fx.exec(t);
            if (!e) return new Date(0 / 0);
            if (e[8]) {
                var i = +e[4] || 0;
                return "Z" !== e[8].toUpperCase() && (i -= e[8].slice(0, 3)), new Date(Date.UTC(+e[1], +(e[2] || 1) - 1, +e[3] || 1, i, +(e[5] || 0), +e[6] || 0, +e[7] || 0))
            }
            return new Date(+e[1], +(e[2] || 1) - 1, +e[3] || 1, +e[4] || 0, +(e[5] || 0), +e[6] || 0, +e[7] || 0)
        }
        return new Date(null == t ? 0 / 0 : Math.round(t))
    }

    function Po(t) {
        return Math.pow(10, Lo(t))
    }

    function Lo(t) {
        if (0 === t) return 0;
        var e = Math.floor(Math.log(t) / Math.LN10);
        return t / Math.pow(10, e) >= 10 && e++, e
    }

    function Oo(t, e) {
        var i, n = Lo(t), r = Math.pow(10, n), a = t / r;
        return i = e ? 1.5 > a ? 1 : 2.5 > a ? 2 : 4 > a ? 3 : 7 > a ? 5 : 10 : 1 > a ? 1 : 2 > a ? 2 : 3 > a ? 3 : 5 > a ? 5 : 10, t = i * r, n >= -20 ? +t.toFixed(0 > n ? -n : 0) : t
    }

    function zo(t, e) {
        var i = (t.length - 1) * e + 1, n = Math.floor(i), r = +t[n - 1], a = i - n;
        return a ? r + a * (t[n] - r) : r
    }

    function Bo(t) {
        function e(t, i, n) {
            return t.interval[n] < i.interval[n] || t.interval[n] === i.interval[n] && (t.close[n] - i.close[n] === (n ? -1 : 1) || !n && e(t, i, 1))
        }

        t.sort(function (t, i) {
            return e(t, i, 0) ? -1 : 1
        });
        for (var i = -1 / 0, n = 1, r = 0; r < t.length;) {
            for (var a = t[r].interval, o = t[r].close, s = 0; 2 > s; s++) a[s] <= i && (a[s] = i, o[s] = s ? 1 : 1 - n), i = a[s], n = o[s];
            a[0] === a[1] && o[0] * o[1] !== 1 ? t.splice(r, 1) : r++
        }
        return t
    }

    function Eo(t) {
        return t - parseFloat(t) >= 0
    }

    function No(t) {
        return isNaN(t) ? "-" : (t = (t + "").split("."), t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (t.length > 1 ? "." + t[1] : ""))
    }

    function Ro(t, e) {
        return t = (t || "").toLowerCase().replace(/-(.)/g, function (t, e) {
            return e.toUpperCase()
        }), e && t && (t = t.charAt(0).toUpperCase() + t.slice(1)), t
    }

    function Fo(t) {
        return null == t ? "" : (t + "").replace(mx, function (t, e) {
            return vx[e]
        })
    }

    function Vo(t, e, i) {
        _(e) || (e = [e]);
        var n = e.length;
        if (!n) return "";
        for (var r = e[0].$vars || [], a = 0; a < r.length; a++) {
            var o = yx[a];
            t = t.replace(xx(o), xx(o, 0))
        }
        for (var s = 0; n > s; s++) for (var l = 0; l < r.length; l++) {
            var u = e[s][r[l]];
            t = t.replace(xx(yx[l], s), i ? Fo(u) : u)
        }
        return t
    }

    function Go(t, e, i) {
        return f(e, function (e, n) {
            t = t.replace("{" + n + "}", i ? Fo(e) : e)
        }), t
    }

    function Ho(t, e) {
        t = b(t) ? {color: t, extraCssText: e} : t || {};
        var i = t.color, n = t.type, e = t.extraCssText, r = t.renderMode || "html", a = t.markerId || "X";
        return i ? "html" === r ? "subItem" === n ? '<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:' + Fo(i) + ";" + (e || "") + '"></span>' : '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + Fo(i) + ";" + (e || "") + '"></span>' : {
            renderMode: r,
            content: "{marker" + a + "|}  ",
            style: {color: i}
        } : ""
    }

    function Wo(t, e) {
        return t += "", "0000".substr(0, e - t.length) + t
    }

    function Xo(t, e, i) {
        ("week" === t || "month" === t || "quarter" === t || "half-year" === t || "year" === t) && (t = "MM-dd\nyyyy");
        var n = ko(e), r = i ? "UTC" : "", a = n["get" + r + "FullYear"](), o = n["get" + r + "Month"]() + 1,
            s = n["get" + r + "Date"](), l = n["get" + r + "Hours"](), u = n["get" + r + "Minutes"](),
            h = n["get" + r + "Seconds"](), c = n["get" + r + "Milliseconds"]();
        return t = t.replace("MM", Wo(o, 2)).replace("M", o).replace("yyyy", a).replace("yy", a % 100).replace("dd", Wo(s, 2)).replace("d", s).replace("hh", Wo(l, 2)).replace("h", l).replace("mm", Wo(u, 2)).replace("m", u).replace("ss", Wo(h, 2)).replace("s", h).replace("SSS", Wo(c, 3))
    }

    function Uo(t) {
        return t ? t.charAt(0).toUpperCase() + t.substr(1) : t
    }

    function Yo(t) {
        return Xi(t.text, t.font, t.textAlign, t.textVerticalAlign, t.textPadding, t.textLineHeight, t.rich, t.truncate)
    }

    function qo(t, e, i, n, r, a, o, s) {
        return Xi(t, e, i, n, r, s, a, o)
    }

    function jo(t, e) {
        if ("_blank" === e || "blank" === e) {
            var i = window.open();
            i.opener = null, i.location = t
        } else window.open(t, e)
    }

    function Zo(t, e, i, n, r) {
        var a = 0, o = 0;
        null == n && (n = 1 / 0), null == r && (r = 1 / 0);
        var s = 0;
        e.eachChild(function (l, u) {
            var h, c, d = l.position, f = l.getBoundingRect(), p = e.childAt(u + 1), g = p && p.getBoundingRect();
            if ("horizontal" === t) {
                var m = f.width + (g ? -g.x + f.x : 0);
                h = a + m, h > n || l.newline ? (a = 0, h = m, o += s + i, s = f.height) : s = Math.max(s, f.height)
            } else {
                var v = f.height + (g ? -g.y + f.y : 0);
                c = o + v, c > r || l.newline ? (a += s + i, o = 0, c = v, s = f.width) : s = Math.max(s, f.width)
            }
            l.newline || (d[0] = a, d[1] = o, "horizontal" === t ? a = h + i : o = c + i)
        })
    }

    function Ko(t, e, i) {
        i = gx(i || 0);
        var n = e.width, r = e.height, a = wo(t.left, n), o = wo(t.top, r), s = wo(t.right, n), l = wo(t.bottom, r),
            u = wo(t.width, n), h = wo(t.height, r), c = i[2] + i[0], d = i[1] + i[3], f = t.aspect;
        switch (isNaN(u) && (u = n - s - d - a), isNaN(h) && (h = r - l - c - o), null != f && (isNaN(u) && isNaN(h) && (f > n / r ? u = .8 * n : h = .8 * r), isNaN(u) && (u = f * h), isNaN(h) && (h = u / f)), isNaN(a) && (a = n - s - u - d), isNaN(o) && (o = r - l - h - c), t.left || t.right) {
            case"center":
                a = n / 2 - u / 2 - i[3];
                break;
            case"right":
                a = n - u - d
        }
        switch (t.top || t.bottom) {
            case"middle":
            case"center":
                o = r / 2 - h / 2 - i[0];
                break;
            case"bottom":
                o = r - h - c
        }
        a = a || 0, o = o || 0, isNaN(u) && (u = n - d - a - (s || 0)), isNaN(h) && (h = r - c - o - (l || 0));
        var p = new Ii(a + i[3], o + i[0], u, h);
        return p.margin = i, p
    }

    function $o(t, e, i) {
        function n(i, n) {
            var o = {}, l = 0, u = {}, h = 0, c = 2;
            if (Sx(i, function (e) {
                u[e] = t[e]
            }), Sx(i, function (t) {
                r(e, t) && (o[t] = u[t] = e[t]), a(o, t) && l++, a(u, t) && h++
            }), s[n]) return a(e, i[1]) ? u[i[2]] = null : a(e, i[2]) && (u[i[1]] = null), u;
            if (h !== c && l) {
                if (l >= c) return o;
                for (var d = 0; d < i.length; d++) {
                    var f = i[d];
                    if (!r(o, f) && r(t, f)) {
                        o[f] = t[f];
                        break
                    }
                }
                return o
            }
            return u
        }

        function r(t, e) {
            return t.hasOwnProperty(e)
        }

        function a(t, e) {
            return null != t[e] && "auto" !== t[e]
        }

        function o(t, e, i) {
            Sx(t, function (t) {
                e[t] = i[t]
            })
        }

        !S(i) && (i = {});
        var s = i.ignoreSize;
        !_(s) && (s = [s, s]);
        var l = n(Ix[0], 0), u = n(Ix[1], 1);
        o(Ix[0], t, l), o(Ix[1], t, u)
    }

    function Qo(t) {
        return Jo({}, t)
    }

    function Jo(t, e) {
        return e && t && Sx(Mx, function (i) {
            e.hasOwnProperty(i) && (t[i] = e[i])
        }), t
    }

    function ts(t) {
        var e = [];
        return f(Ax.getClassesByMainType(t), function (t) {
            e = e.concat(t.prototype.dependencies || [])
        }), e = p(e, function (t) {
            return pr(t).main
        }), "dataset" !== t && u(e, "dataset") <= 0 && e.unshift("dataset"), e
    }

    function es(t, e) {
        for (var i = t.length, n = 0; i > n; n++) if (t[n].length > e) return t[n];
        return t[i - 1]
    }

    function is(t) {
        this.fromDataset = t.fromDataset, this.data = t.data || (t.sourceFormat === Nx ? {} : []), this.sourceFormat = t.sourceFormat || Rx, this.seriesLayoutBy = t.seriesLayoutBy || Vx, this.dimensionsDefine = t.dimensionsDefine, this.encodeDefine = t.encodeDefine && R(t.encodeDefine), this.startIndex = t.startIndex || 0, this.dimensionsDetectCount = t.dimensionsDetectCount
    }

    function ns(t) {
        var e = t.option.source, i = Rx;
        if (I(e)) i = Fx; else if (_(e)) {
            0 === e.length && (i = Bx);
            for (var n = 0, r = e.length; r > n; n++) {
                var a = e[n];
                if (null != a) {
                    if (_(a)) {
                        i = Bx;
                        break
                    }
                    if (S(a)) {
                        i = Ex;
                        break
                    }
                }
            }
        } else if (S(e)) {
            for (var o in e) if (e.hasOwnProperty(o) && d(e[o])) {
                i = Nx;
                break
            }
        } else if (null != e) throw new Error("Invalid data");
        Wx(t).sourceFormat = i
    }

    function rs(t) {
        return Wx(t).source
    }

    function as(t) {
        Wx(t).datasetMap = R()
    }

    function os(t) {
        var e = t.option, i = e.data, n = I(i) ? Fx : zx, r = !1, a = e.seriesLayoutBy, o = e.sourceHeader,
            s = e.dimensions, l = fs(t);
        if (l) {
            var u = l.option;
            i = u.source, n = Wx(l).sourceFormat, r = !0, a = a || u.seriesLayoutBy, null == o && (o = u.sourceHeader), s = s || u.dimensions
        }
        var h = ss(i, n, a, o, s);
        Wx(t).source = new is({
            data: i,
            fromDataset: r,
            seriesLayoutBy: a,
            sourceFormat: n,
            dimensionsDefine: h.dimensionsDefine,
            startIndex: h.startIndex,
            dimensionsDetectCount: h.dimensionsDetectCount,
            encodeDefine: e.encode
        })
    }

    function ss(t, e, i, n, r) {
        if (!t) return {dimensionsDefine: ls(r)};
        var a, o;
        if (e === Bx) "auto" === n || null == n ? us(function (t) {
            null != t && "-" !== t && (b(t) ? null == o && (o = 1) : o = 0)
        }, i, t, 10) : o = n ? 1 : 0, r || 1 !== o || (r = [], us(function (t, e) {
            r[e] = null != t ? t : ""
        }, i, t)), a = r ? r.length : i === Gx ? t.length : t[0] ? t[0].length : null; else if (e === Ex) r || (r = hs(t)); else if (e === Nx) r || (r = [], f(t, function (t, e) {
            r.push(e)
        })); else if (e === zx) {
            var s = er(t[0]);
            a = _(s) && s.length || 1
        }
        return {startIndex: o, dimensionsDefine: ls(r), dimensionsDetectCount: a}
    }

    function ls(t) {
        if (t) {
            var e = R();
            return p(t, function (t) {
                if (t = o({}, S(t) ? t : {name: t}), null == t.name) return t;
                t.name += "", null == t.displayName && (t.displayName = t.name);
                var i = e.get(t.name);
                return i ? t.name += "-" + i.count++ : e.set(t.name, {count: 1}), t
            })
        }
    }

    function us(t, e, i, n) {
        if (null == n && (n = 1 / 0), e === Gx) for (var r = 0; r < i.length && n > r; r++) t(i[r] ? i[r][0] : null, r); else for (var a = i[0] || [], r = 0; r < a.length && n > r; r++) t(a[r], r)
    }

    function hs(t) {
        for (var e, i = 0; i < t.length && !(e = t[i++]);) ;
        if (e) {
            var n = [];
            return f(e, function (t, e) {
                n.push(e)
            }), n
        }
    }

    function cs(t, e, i) {
        function n(t, e, i) {
            for (var n = 0; i > n; n++) t.push(e + n)
        }

        function r(t) {
            var e = t.dimsDef;
            return e ? e.length : 1
        }

        var a = {}, o = fs(e);
        if (!o || !t) return a;
        var s, l, u = [], h = [], c = e.ecModel, d = Wx(c).datasetMap, p = o.uid + "_" + i.seriesLayoutBy;
        t = t.slice(), f(t, function (e, i) {
            !S(e) && (t[i] = {name: e}), "ordinal" === e.type && null == s && (s = i, l = r(t[i])), a[e.name] = []
        });
        var g = d.get(p) || d.set(p, {categoryWayDim: l, valueWayDim: 0});
        return f(t, function (t, e) {
            var i = t.name, o = r(t);
            if (null == s) {
                var l = g.valueWayDim;
                n(a[i], l, o), n(h, l, o), g.valueWayDim += o
            } else if (s === e) n(a[i], 0, o), n(u, 0, o); else {
                var l = g.categoryWayDim;
                n(a[i], l, o), n(h, l, o), g.categoryWayDim += o
            }
        }), u.length && (a.itemName = u), h.length && (a.seriesName = h), a
    }

    function ds(t, e, i) {
        var n = {}, r = fs(t);
        if (!r) return n;
        var a, o = e.sourceFormat, s = e.dimensionsDefine;
        (o === Ex || o === Nx) && f(s, function (t, e) {
            "name" === (S(t) ? t.name : t) && (a = e)
        });
        var l = function () {
            function t(t) {
                return null != t.v && null != t.n
            }

            for (var n = {}, r = {}, l = [], u = 0, h = Math.min(5, i); h > u; u++) {
                var c = gs(e.data, o, e.seriesLayoutBy, s, e.startIndex, u);
                l.push(c);
                var d = c === Hx.Not;
                if (d && null == n.v && u !== a && (n.v = u), (null == n.n || n.n === n.v || !d && l[n.n] === Hx.Not) && (n.n = u), t(n) && l[n.n] !== Hx.Not) return n;
                d || (c === Hx.Might && null == r.v && u !== a && (r.v = u), (null == r.n || r.n === r.v) && (r.n = u))
            }
            return t(n) ? n : t(r) ? r : null
        }();
        if (l) {
            n.value = l.v;
            var u = null != a ? a : l.n;
            n.itemName = [u], n.seriesName = [u]
        }
        return n
    }

    function fs(t) {
        var e = t.option, i = e.data;
        return i ? void 0 : t.ecModel.getComponent("dataset", e.datasetIndex || 0)
    }

    function ps(t, e) {
        return gs(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e)
    }

    function gs(t, e, i, n, r, a) {
        function o(t) {
            var e = b(t);
            return null != t && isFinite(t) && "" !== t ? e ? Hx.Might : Hx.Not : e && "-" !== t ? Hx.Must : void 0
        }

        var s, l = 5;
        if (I(t)) return Hx.Not;
        var u, h;
        if (n) {
            var c = n[a];
            S(c) ? (u = c.name, h = c.type) : b(c) && (u = c)
        }
        if (null != h) return "ordinal" === h ? Hx.Must : Hx.Not;
        if (e === Bx) if (i === Gx) {
            for (var d = t[a], f = 0; f < (d || []).length && l > f; f++) if (null != (s = o(d[r + f]))) return s
        } else for (var f = 0; f < t.length && l > f; f++) {
            var p = t[r + f];
            if (p && null != (s = o(p[a]))) return s
        } else if (e === Ex) {
            if (!u) return Hx.Not;
            for (var f = 0; f < t.length && l > f; f++) {
                var g = t[f];
                if (g && null != (s = o(g[u]))) return s
            }
        } else if (e === Nx) {
            if (!u) return Hx.Not;
            var d = t[u];
            if (!d || I(d)) return Hx.Not;
            for (var f = 0; f < d.length && l > f; f++) if (null != (s = o(d[f]))) return s
        } else if (e === zx) for (var f = 0; f < t.length && l > f; f++) {
            var g = t[f], m = er(g);
            if (!_(m)) return Hx.Not;
            if (null != (s = o(m[a]))) return s
        }
        return Hx.Not
    }

    function ms(t, e) {
        if (e) {
            var i = e.seiresIndex, n = e.seriesId, r = e.seriesName;
            return null != i && t.componentIndex !== i || null != n && t.id !== n || null != r && t.name !== r
        }
    }

    function vs(t, e) {
        var i = t.color && !t.colorLayer;
        f(e, function (e, a) {
            "colorLayer" === a && i || Ax.hasClass(a) || ("object" == typeof e ? t[a] = t[a] ? r(t[a], e, !1) : n(e) : null == t[a] && (t[a] = e))
        })
    }

    function ys(t) {
        t = t, this.option = {}, this.option[Xx] = 1, this._componentsMap = R({series: []}), this._seriesIndices, this._seriesIndicesMap, vs(t, this._theme.option), r(t, Px, !1), this.mergeOption(t)
    }

    function xs(t, e) {
        _(e) || (e = e ? [e] : []);
        var i = {};
        return f(e, function (e) {
            i[e] = (t.get(e) || []).slice()
        }), i
    }

    function _s(t, e, i) {
        var n = e.type ? e.type : i ? i.subType : Ax.determineSubType(t, e);
        return n
    }

    function ws(t, e) {
        t._seriesIndicesMap = R(t._seriesIndices = p(e, function (t) {
            return t.componentIndex
        }) || [])
    }

    function bs(t, e) {
        return e.hasOwnProperty("subType") ? m(t, function (t) {
            return t.subType === e.subType
        }) : t
    }

    function Ss(t) {
        f(Yx, function (e) {
            this[e] = y(t[e], t)
        }, this)
    }

    function Ms() {
        this._coordinateSystems = []
    }

    function Is(t) {
        this._api = t, this._timelineOptions = [], this._mediaList = [], this._mediaDefault, this._currentMediaIndices = [], this._optionBackup, this._newBaseOption
    }

    function Cs(t, e, i) {
        var n, r, a = [], o = [], s = t.timeline;
        if (t.baseOption && (r = t.baseOption), (s || t.options) && (r = r || {}, a = (t.options || []).slice()), t.media) {
            r = r || {};
            var l = t.media;
            jx(l, function (t) {
                t && t.option && (t.query ? o.push(t) : n || (n = t))
            })
        }
        return r || (r = t), r.timeline || (r.timeline = s), jx([r].concat(a).concat(p(o, function (t) {
            return t.option
        })), function (t) {
            jx(e, function (e) {
                e(t, i)
            })
        }), {baseOption: r, timelineOptions: a, mediaDefault: n, mediaList: o}
    }

    function Ts(t, e, i) {
        var n = {width: e, height: i, aspectratio: e / i}, r = !0;
        return f(t, function (t, e) {
            var i = e.match(Qx);
            if (i && i[1] && i[2]) {
                var a = i[1], o = i[2].toLowerCase();
                Ds(n[o], t, a) || (r = !1)
            }
        }), r
    }

    function Ds(t, e, i) {
        return "min" === i ? t >= e : "max" === i ? e >= t : t === e
    }

    function As(t, e) {
        return t.join(",") === e.join(",")
    }

    function ks(t, e) {
        e = e || {}, jx(e, function (e, i) {
            if (null != e) {
                var n = t[i];
                if (Ax.hasClass(i)) {
                    e = Jn(e), n = Jn(n);
                    var r = nr(n, e);
                    t[i] = Kx(r, function (t) {
                        return t.option && t.exist ? $x(t.exist, t.option, !0) : t.exist || t.option
                    })
                } else t[i] = $x(n, e, !0)
            }
        })
    }

    function Ps(t) {
        var e = t && t.itemStyle;
        if (e) for (var i = 0, n = e_.length; n > i; i++) {
            var a = e_[i], o = e.normal, s = e.emphasis;
            o && o[a] && (t[a] = t[a] || {}, t[a].normal ? r(t[a].normal, o[a]) : t[a].normal = o[a], o[a] = null), s && s[a] && (t[a] = t[a] || {}, t[a].emphasis ? r(t[a].emphasis, s[a]) : t[a].emphasis = s[a], s[a] = null)
        }
    }

    function Ls(t, e, i) {
        if (t && t[e] && (t[e].normal || t[e].emphasis)) {
            var n = t[e].normal, r = t[e].emphasis;
            n && (i ? (t[e].normal = t[e].emphasis = null, s(t[e], n)) : t[e] = n), r && (t.emphasis = t.emphasis || {}, t.emphasis[e] = r)
        }
    }

    function Os(t) {
        Ls(t, "itemStyle"), Ls(t, "lineStyle"), Ls(t, "areaStyle"), Ls(t, "label"), Ls(t, "labelLine"), Ls(t, "upperLabel"), Ls(t, "edgeLabel")
    }

    function zs(t, e) {
        var i = t_(t) && t[e], n = t_(i) && i.textStyle;
        if (n) for (var r = 0, a = lv.length; a > r; r++) {
            var e = lv[r];
            n.hasOwnProperty(e) && (i[e] = n[e])
        }
    }

    function Bs(t) {
        t && (Os(t), zs(t, "label"), t.emphasis && zs(t.emphasis, "label"))
    }

    function Es(t) {
        if (t_(t)) {
            Ps(t), Os(t), zs(t, "label"), zs(t, "upperLabel"), zs(t, "edgeLabel"), t.emphasis && (zs(t.emphasis, "label"), zs(t.emphasis, "upperLabel"), zs(t.emphasis, "edgeLabel"));
            var e = t.markPoint;
            e && (Ps(e), Bs(e));
            var i = t.markLine;
            i && (Ps(i), Bs(i));
            var n = t.markArea;
            n && Bs(n);
            var r = t.data;
            if ("graph" === t.type) {
                r = r || t.nodes;
                var a = t.links || t.edges;
                if (a && !I(a)) for (var o = 0; o < a.length; o++) Bs(a[o]);
                f(t.categories, function (t) {
                    Os(t)
                })
            }
            if (r && !I(r)) for (var o = 0; o < r.length; o++) Bs(r[o]);
            var e = t.markPoint;
            if (e && e.data) for (var s = e.data, o = 0; o < s.length; o++) Bs(s[o]);
            var i = t.markLine;
            if (i && i.data) for (var l = i.data, o = 0; o < l.length; o++) _(l[o]) ? (Bs(l[o][0]), Bs(l[o][1])) : Bs(l[o]);
            "gauge" === t.type ? (zs(t, "axisLabel"), zs(t, "title"), zs(t, "detail")) : "treemap" === t.type ? (Ls(t.breadcrumb, "itemStyle"), f(t.levels, function (t) {
                Os(t)
            })) : "tree" === t.type && Os(t.leaves)
        }
    }

    function Ns(t) {
        return _(t) ? t : t ? [t] : []
    }

    function Rs(t) {
        return (_(t) ? t[0] : t) || {}
    }

    function Fs(t, e) {
        e = e.split(",");
        for (var i = t, n = 0; n < e.length && (i = i && i[e[n]], null != i); n++) ;
        return i
    }

    function Vs(t, e, i, n) {
        e = e.split(",");
        for (var r, a = t, o = 0; o < e.length - 1; o++) r = e[o], null == a[r] && (a[r] = {}), a = a[r];
        (n || null == a[e[o]]) && (a[e[o]] = i)
    }

    function Gs(t) {
        f(n_, function (e) {
            e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]])
        })
    }

    function Hs(t) {
        f(t, function (e, i) {
            var n = [], r = [0 / 0, 0 / 0], a = [e.stackResultDimension, e.stackedOverDimension], o = e.data,
                s = e.isStackedByIndex, l = o.map(a, function (a, l, u) {
                    var h = o.get(e.stackedDimension, u);
                    if (isNaN(h)) return r;
                    var c, d;
                    s ? d = o.getRawIndex(u) : c = o.get(e.stackedByDimension, u);
                    for (var f = 0 / 0, p = i - 1; p >= 0; p--) {
                        var g = t[p];
                        if (s || (d = g.data.rawIndexOf(g.stackedByDimension, c)), d >= 0) {
                            var m = g.data.getByRawIndex(g.stackResultDimension, d);
                            if (h >= 0 && m > 0 || 0 >= h && 0 > m) {
                                h += m, f = m;
                                break
                            }
                        }
                    }
                    return n[0] = h, n[1] = f, n
                });
            o.hostModel.setData(l), e.data = l
        })
    }

    function Ws(t, e) {
        is.isInstance(t) || (t = is.seriesDataToSource(t)), this._source = t;
        var i = this._data = t.data, n = t.sourceFormat;
        n === Fx && (this._offset = 0, this._dimSize = e, this._data = i);
        var r = l_[n === Bx ? n + "_" + t.seriesLayoutBy : n];
        o(this, r)
    }

    function Xs() {
        return this._data.length
    }

    function Us(t) {
        return this._data[t]
    }

    function Ys(t) {
        for (var e = 0; e < t.length; e++) this._data.push(t[e])
    }

    function qs(t, e, i) {
        return null != i ? t[i] : t
    }

    function js(t, e, i, n) {
        return Zs(t[n], this._dimensionInfos[e])
    }

    function Zs(t, e) {
        var i = e && e.type;
        if ("ordinal" === i) {
            var n = e && e.ordinalMeta;
            return n ? n.parseAndCollect(t) : t
        }
        return "time" === i && "number" != typeof t && null != t && "-" !== t && (t = +ko(t)), null == t || "" === t ? 0 / 0 : +t
    }

    function Ks(t, e, i) {
        if (t) {
            var n = t.getRawDataItem(e);
            if (null != n) {
                var r, a, o = t.getProvider().getSource().sourceFormat, s = t.getDimensionInfo(i);
                return s && (r = s.name, a = s.index), u_[o](n, e, a, r)
            }
        }
    }

    function $s(t, e, i) {
        if (t) {
            var n = t.getProvider().getSource().sourceFormat;
            if (n === zx || n === Ex) {
                var r = t.getRawDataItem(e);
                return n !== zx || S(r) || (r = null), r ? r[i] : void 0
            }
        }
    }

    function Qs(t) {
        return new Js(t)
    }

    function Js(t) {
        t = t || {}, this._reset = t.reset, this._plan = t.plan, this._count = t.count, this._onDirty = t.onDirty, this._dirty = !0, this.context
    }

    function tl(t, e, i, n, r, a) {
        p_.reset(i, n, r, a), t._callingProgress = e, t._callingProgress({
            start: i,
            end: n,
            count: n - i,
            next: p_.next
        }, t.context)
    }

    function el(t, e) {
        t._dueIndex = t._outputDueEnd = t._dueEnd = 0, t._settedOutputEnd = null;
        var i, n;
        !e && t._reset && (i = t._reset(t.context), i && i.progress && (n = i.forceFirstProgress, i = i.progress), _(i) && !i.length && (i = null)), t._progress = i, t._modBy = t._modDataCount = null;
        var r = t._downstream;
        return r && r.dirty(), n
    }

    function il(t) {
        var e = t.name;
        ar(t) || (t.name = nl(t) || e)
    }

    function nl(t) {
        var e = t.getRawData(), i = e.mapDimension("seriesName", !0), n = [];
        return f(i, function (t) {
            var i = e.getDimensionInfo(t);
            i.displayName && n.push(i.displayName)
        }), n.join(" ")
    }

    function rl(t) {
        return t.model.getRawData().count()
    }

    function al(t) {
        var e = t.model;
        return e.setData(e.getRawData().cloneShallow()), ol
    }

    function ol(t, e) {
        e.outputData && t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData)
    }

    function sl(t, e) {
        f(t.CHANGABLE_METHODS, function (i) {
            t.wrapMethod(i, x(ll, e))
        })
    }

    function ll(t) {
        var e = ul(t);
        e && e.setOutputEnd(this.count())
    }

    function ul(t) {
        var e = (t.ecModel || {}).scheduler, i = e && e.getPipeline(t.uid);
        if (i) {
            var n = i.currentTask;
            if (n) {
                var r = n.agentStubMap;
                r && (n = r.get(t.uid))
            }
            return n
        }
    }

    function hl() {
        this.group = new am, this.uid = mo("viewChart"), this.renderTask = Qs({
            plan: fl,
            reset: pl
        }), this.renderTask.context = {view: this}
    }

    function cl(t, e, i) {
        if (t && (t.trigger(e, i), t.isGroup && !Fa(t))) for (var n = 0, r = t.childCount(); r > n; n++) cl(t.childAt(n), e, i)
    }

    function dl(t, e, i) {
        var n = sr(t, e), r = e && null != e.highlightKey ? Va(e.highlightKey) : null;
        null != n ? f(Jn(n), function (e) {
            cl(t.getItemGraphicEl(e), i, r)
        }) : t.eachItemGraphicEl(function (t) {
            cl(t, i, r)
        })
    }

    function fl(t) {
        return w_(t.model)
    }

    function pl(t) {
        var e = t.model, i = t.ecModel, n = t.api, r = t.payload, a = e.pipelineContext.progressiveRender, o = t.view,
            s = r && __(r).updateMethod, l = a ? "incrementalPrepareRender" : s && o[s] ? s : "render";
        return "render" !== l && o[l](e, i, n, r), S_[l]
    }

    function gl(t, e, i) {
        function n() {
            h = (new Date).getTime(), c = null, t.apply(o, s || [])
        }

        var r, a, o, s, l, u = 0, h = 0, c = null;
        e = e || 0;
        var d = function () {
            r = (new Date).getTime(), o = this, s = arguments;
            var t = l || e, d = l || i;
            l = null, a = r - (d ? u : h) - t, clearTimeout(c), d ? c = setTimeout(n, t) : a >= 0 ? n() : c = setTimeout(n, -a), u = r
        };
        return d.clear = function () {
            c && (clearTimeout(c), c = null)
        }, d.debounceNextCall = function (t) {
            l = t
        }, d
    }

    function ml(t, e, i, n) {
        var r = t[e];
        if (r) {
            var a = r[M_] || r, o = r[C_], s = r[I_];
            if (s !== i || o !== n) {
                if (null == i || !n) return t[e] = a;
                r = t[e] = gl(a, i, "debounce" === n), r[M_] = a, r[C_] = n, r[I_] = i
            }
            return r
        }
    }

    function vl(t, e, i, n) {
        this.ecInstance = t, this.api = e, this.unfinished;
        var i = this._dataProcessorHandlers = i.slice(), n = this._visualHandlers = n.slice();
        this._allHandlers = i.concat(n), this._stageTaskMap = R()
    }

    function yl(t, e, i, n, r) {
        function a(t, e) {
            return t.setDirty && (!t.dirtyMap || t.dirtyMap.get(e.__pipeline.id))
        }

        r = r || {};
        var o;
        f(e, function (e) {
            if (!r.visualType || r.visualType === e.visualType) {
                var s = t._stageTaskMap.get(e.uid), l = s.seriesTaskMap, u = s.overallTask;
                if (u) {
                    var h, c = u.agentStubMap;
                    c.each(function (t) {
                        a(r, t) && (t.dirty(), h = !0)
                    }), h && u.dirty(), O_(u, n);
                    var d = t.getPerformArgs(u, r.block);
                    c.each(function (t) {
                        t.perform(d)
                    }), o |= u.perform(d)
                } else l && l.each(function (s) {
                    a(r, s) && s.dirty();
                    var l = t.getPerformArgs(s, r.block);
                    l.skip = !e.performRawSeries && i.isSeriesFiltered(s.context.model), O_(s, n), o |= s.perform(l)
                })
            }
        }), t.unfinished |= o
    }

    function xl(t, e, i, n, r) {
        function a(i) {
            var a = i.uid, s = o.get(a) || o.set(a, Qs({plan: Il, reset: Cl, count: Dl}));
            s.context = {
                model: i,
                ecModel: n,
                api: r,
                useClearVisual: e.isVisual && !e.isLayout,
                plan: e.plan,
                reset: e.reset,
                scheduler: t
            }, Al(t, i, s)
        }

        var o = i.seriesTaskMap || (i.seriesTaskMap = R()), s = e.seriesType, l = e.getTargetSeries;
        e.createOnAllSeries ? n.eachRawSeries(a) : s ? n.eachRawSeriesByType(s, a) : l && l(n, r).each(a);
        var u = t._pipelineMap;
        o.each(function (t, e) {
            u.get(e) || (t.dispose(), o.removeKey(e))
        })
    }

    function _l(t, e, i, n, r) {
        function a(e) {
            var i = e.uid, n = s.get(i);
            n || (n = s.set(i, Qs({reset: bl, onDirty: Ml})), o.dirty()), n.context = {
                model: e,
                overallProgress: h,
                modifyOutputEnd: c
            }, n.agent = o, n.__block = h, Al(t, e, n)
        }

        var o = i.overallTask = i.overallTask || Qs({reset: wl});
        o.context = {ecModel: n, api: r, overallReset: e.overallReset, scheduler: t};
        var s = o.agentStubMap = o.agentStubMap || R(), l = e.seriesType, u = e.getTargetSeries, h = !0,
            c = e.modifyOutputEnd;
        l ? n.eachRawSeriesByType(l, a) : u ? u(n, r).each(a) : (h = !1, f(n.getSeries(), a));
        var d = t._pipelineMap;
        s.each(function (t, e) {
            d.get(e) || (t.dispose(), o.dirty(), s.removeKey(e))
        })
    }

    function wl(t) {
        t.overallReset(t.ecModel, t.api, t.payload)
    }

    function bl(t) {
        return t.overallProgress && Sl
    }

    function Sl() {
        this.agent.dirty(), this.getDownstream().dirty()
    }

    function Ml() {
        this.agent && this.agent.dirty()
    }

    function Il(t) {
        return t.plan && t.plan(t.model, t.ecModel, t.api, t.payload)
    }

    function Cl(t) {
        t.useClearVisual && t.data.clearAllVisual();
        var e = t.resetDefines = Jn(t.reset(t.model, t.ecModel, t.api, t.payload));
        return e.length > 1 ? p(e, function (t, e) {
            return Tl(e)
        }) : z_
    }

    function Tl(t) {
        return function (e, i) {
            var n = i.data, r = i.resetDefines[t];
            if (r && r.dataEach) for (var a = e.start; a < e.end; a++) r.dataEach(n, a); else r && r.progress && r.progress(e, n)
        }
    }

    function Dl(t) {
        return t.data.count()
    }

    function Al(t, e, i) {
        var n = e.uid, r = t._pipelineMap.get(n);
        !r.head && (r.head = i), r.tail && r.tail.pipe(i), r.tail = i, i.__idxInPipeline = r.count++, i.__pipeline = r
    }

    function kl(t) {
        B_ = null;
        try {
            t(E_, N_)
        } catch (e) {
        }
        return B_
    }

    function Pl(t, e) {
        for (var i in e.prototype) t[i] = V
    }

    function Ll(t) {
        if (b(t)) {
            var e = new DOMParser;
            t = e.parseFromString(t, "text/xml")
        }
        for (9 === t.nodeType && (t = t.firstChild); "svg" !== t.nodeName.toLowerCase() || 1 !== t.nodeType;) t = t.nextSibling;
        return t
    }

    function Ol() {
        this._defs = {}, this._root = null, this._isDefine = !1, this._isText = !1
    }

    function zl(t, e) {
        for (var i = t.firstChild; i;) {
            if (1 === i.nodeType) {
                var n = i.getAttribute("offset");
                n = n.indexOf("%") > 0 ? parseInt(n, 10) / 100 : n ? parseFloat(n) : 0;
                var r = i.getAttribute("stop-color") || "#000000";
                e.addColorStop(n, r)
            }
            i = i.nextSibling
        }
    }

    function Bl(t, e) {
        t && t.__inheritedStyle && (e.__inheritedStyle || (e.__inheritedStyle = {}), s(e.__inheritedStyle, t.__inheritedStyle))
    }

    function El(t) {
        for (var e = z(t).split(U_), i = [], n = 0; n < e.length; n += 2) {
            var r = parseFloat(e[n]), a = parseFloat(e[n + 1]);
            i.push([r, a])
        }
        return i
    }

    function Nl(t, e, i, n) {
        var r = e.__inheritedStyle || {}, a = "text" === e.type;
        if (1 === t.nodeType && (Fl(t, e), o(r, Vl(t)), !n)) for (var s in j_) if (j_.hasOwnProperty(s)) {
            var l = t.getAttribute(s);
            null != l && (r[j_[s]] = l)
        }
        var u = a ? "textFill" : "fill", h = a ? "textStroke" : "stroke";
        e.style = e.style || new pm;
        var c = e.style;
        null != r.fill && c.set(u, Rl(r.fill, i)), null != r.stroke && c.set(h, Rl(r.stroke, i)), f(["lineWidth", "opacity", "fillOpacity", "strokeOpacity", "miterLimit", "fontSize"], function (t) {
            var e = "lineWidth" === t && a ? "textStrokeWidth" : t;
            null != r[t] && c.set(e, parseFloat(r[t]))
        }), r.textBaseline && "auto" !== r.textBaseline || (r.textBaseline = "alphabetic"), "alphabetic" === r.textBaseline && (r.textBaseline = "bottom"), "start" === r.textAlign && (r.textAlign = "left"), "end" === r.textAlign && (r.textAlign = "right"), f(["lineDashOffset", "lineCap", "lineJoin", "fontWeight", "fontFamily", "fontStyle", "textAlign", "textBaseline"], function (t) {
            null != r[t] && c.set(t, r[t])
        }), r.lineDash && (e.style.lineDash = z(r.lineDash).split(U_)), c[h] && "none" !== c[h] && (e[h] = !0), e.__inheritedStyle = r
    }

    function Rl(t, e) {
        var i = e && t && t.match(Z_);
        if (i) {
            var n = z(i[1]), r = e[n];
            return r
        }
        return t
    }

    function Fl(t, e) {
        var i = t.getAttribute("transform");
        if (i) {
            i = i.replace(/,/g, " ");
            var n = null, r = [];
            i.replace(K_, function (t, e, i) {
                r.push(e, i)
            });
            for (var a = r.length - 1; a > 0; a -= 2) {
                var o = r[a], s = r[a - 1];
                switch (n = n || Le(), s) {
                    case"translate":
                        o = z(o).split(U_), Ee(n, n, [parseFloat(o[0]), parseFloat(o[1] || 0)]);
                        break;
                    case"scale":
                        o = z(o).split(U_), Re(n, n, [parseFloat(o[0]), parseFloat(o[1] || o[0])]);
                        break;
                    case"rotate":
                        o = z(o).split(U_), Ne(n, n, parseFloat(o[0]));
                        break;
                    case"skew":
                        o = z(o).split(U_), console.warn("Skew transform is not supported yet");
                        break;
                    case"matrix":
                        var o = z(o).split(U_);
                        n[0] = parseFloat(o[0]), n[1] = parseFloat(o[1]), n[2] = parseFloat(o[2]), n[3] = parseFloat(o[3]), n[4] = parseFloat(o[4]), n[5] = parseFloat(o[5])
                }
            }
            e.setLocalTransform(n)
        }
    }

    function Vl(t) {
        var e = t.getAttribute("style"), i = {};
        if (!e) return i;
        var n = {};
        $_.lastIndex = 0;
        for (var r; null != (r = $_.exec(e));) n[r[1]] = r[2];
        for (var a in j_) j_.hasOwnProperty(a) && null != n[a] && (i[j_[a]] = n[a]);
        return i
    }

    function Gl(t, e, i) {
        var n = e / t.width, r = i / t.height, a = Math.min(n, r), o = [a, a],
            s = [-(t.x + t.width / 2) * a + e / 2, -(t.y + t.height / 2) * a + i / 2];
        return {scale: o, position: s}
    }

    function Hl(t, e) {
        return function (i, n, r) {
            (e || !this._disposed) && (i = i && i.toLowerCase(), fg.prototype[t].call(this, i, n, r))
        }
    }

    function Wl() {
        fg.call(this)
    }

    function Xl(t, e, i) {
        function r(t, e) {
            return t.__prio - e.__prio
        }

        i = i || {}, "string" == typeof e && (e = Ow[e]), this.id, this.group, this._dom = t;
        var a = "canvas", o = this._zr = jn(t, {
            renderer: i.renderer || a,
            devicePixelRatio: i.devicePixelRatio,
            width: i.width,
            height: i.height
        });
        this._throttledZrFlush = gl(y(o.flush, o), 17);
        var e = n(e);
        e && a_(e, !0), this._theme = e, this._chartsViews = [], this._chartsMap = {}, this._componentsViews = [], this._componentsMap = {}, this._coordSysMgr = new Ms;
        var s = this._api = lu(this);
        Oi(Lw, r), Oi(Aw, r), this._scheduler = new vl(this, s, Aw, Lw), fg.call(this, this._ecEventProcessor = new uu), this._messageCenter = new Wl, this._initEvents(), this.resize = y(this.resize, this), this._pendingActions = [], o.animation.on("frame", this._onframe, this), Ql(o, this), B(this)
    }

    function Ul(t, e, i) {
        if (!this._disposed) {
            var n, r = this._model, a = this._coordSysMgr.getCoordinateSystems();
            e = ur(r, e);
            for (var o = 0; o < a.length; o++) {
                var s = a[o];
                if (s[t] && null != (n = s[t](r, e, i))) return n
            }
        }
    }

    function Yl(t) {
        var e = t._model, i = t._scheduler;
        i.restorePipelines(e), i.prepareStageTasks(), Jl(t, "component", e, i), Jl(t, "chart", e, i), i.plan()
    }

    function ql(t, e, i, n, r) {
        function a(n) {
            n && n.__alive && n[e] && n[e](n.__model, o, t._api, i)
        }

        var o = t._model;
        if (!n) return void iw(t._componentsViews.concat(t._chartsViews), a);
        var s = {};
        s[n + "Id"] = i[n + "Id"], s[n + "Index"] = i[n + "Index"], s[n + "Name"] = i[n + "Name"];
        var l = {mainType: n, query: s};
        r && (l.subType = r);
        var u = i.excludeSeriesId;
        null != u && (u = R(Jn(u))), o && o.eachComponent(l, function (e) {
            u && null != u.get(e.id) || a(t["series" === n ? "_chartsMap" : "_componentsMap"][e.__viewId])
        }, t)
    }

    function jl(t, e) {
        var i = t._chartsMap, n = t._scheduler;
        e.eachSeries(function (t) {
            n.updateStreamModes(t, i[t.__viewId])
        })
    }

    function Zl(t, e) {
        var i = t.type, n = t.escapeConnect, r = Tw[i], a = r.actionInfo, l = (a.update || "update").split(":"),
            u = l.pop();
        l = null != l[0] && aw(l[0]), this[ww] = !0;
        var h = [t], c = !1;
        t.batch && (c = !0, h = p(t.batch, function (e) {
            return e = s(o({}, e), t), e.batch = null, e
        }));
        var d, f = [], g = "highlight" === i || "downplay" === i;
        iw(h, function (t) {
            d = r.action(t, this._model, this._api), d = d || o({}, t), d.type = a.event || d.type, f.push(d), g ? ql(this, u, t, "series") : l && ql(this, u, t, l.main, l.sub)
        }, this), "none" === u || g || l || (this[bw] ? (Yl(this), Iw.update.call(this, t), this[bw] = !1) : Iw[u].call(this, t)), d = c ? {
            type: a.event || i,
            escapeConnect: n,
            batch: f
        } : f[0], this[ww] = !1, !e && this._messageCenter.trigger(d.type, d)
    }

    function Kl(t) {
        for (var e = this._pendingActions; e.length;) {
            var i = e.shift();
            Zl.call(this, i, t)
        }
    }

    function $l(t) {
        !t && this.trigger("updated")
    }

    function Ql(t, e) {
        t.on("rendered", function () {
            e.trigger("rendered"), !t.animation.isFinished() || e[bw] || e._scheduler.unfinished || e._pendingActions.length || e.trigger("finished")
        })
    }

    function Jl(t, e, i, n) {
        function r(t) {
            var e = "_ec_" + t.id + "_" + t.type, r = s[e];
            if (!r) {
                var h = aw(t.type), c = a ? v_.getClass(h.main, h.sub) : hl.getClass(h.sub);
                r = new c, r.init(i, u), s[e] = r, o.push(r), l.add(r.group)
            }
            t.__viewId = r.__id = e, r.__alive = !0, r.__model = t, r.group.__ecComponentInfo = {
                mainType: t.mainType,
                index: t.componentIndex
            }, !a && n.prepareView(r, t, i, u)
        }

        for (var a = "component" === e, o = a ? t._componentsViews : t._chartsViews, s = a ? t._componentsMap : t._chartsMap, l = t._zr, u = t._api, h = 0; h < o.length; h++) o[h].__alive = !1;
        a ? i.eachComponent(function (t, e) {
            "series" !== t && r(e)
        }) : i.eachSeries(r);
        for (var h = 0; h < o.length;) {
            var c = o[h];
            c.__alive ? h++ : (!a && c.renderTask.dispose(), l.remove(c.group), c.dispose(i, u), o.splice(h, 1), delete s[c.__id], c.__id = c.group.__ecComponentInfo = null)
        }
    }

    function tu(t) {
        t.clearColorPalette(), t.eachSeries(function (t) {
            t.clearColorPalette()
        })
    }

    function eu(t, e, i, n) {
        iu(t, e, i, n), iw(t._chartsViews, function (t) {
            t.__alive = !1
        }), nu(t, e, i, n), iw(t._chartsViews, function (t) {
            t.__alive || t.remove(e, i)
        })
    }

    function iu(t, e, i, n, r) {
        iw(r || t._componentsViews, function (t) {
            var r = t.__model;
            t.render(r, e, i, n), su(r, t)
        })
    }

    function nu(t, e, i, n, r) {
        var a, o = t._scheduler;
        e.eachSeries(function (e) {
            var i = t._chartsMap[e.__viewId];
            i.__alive = !0;
            var s = i.renderTask;
            o.updatePayload(s, n), r && r.get(e.uid) && s.dirty(), a |= s.perform(o.getPerformArgs(s)), i.group.silent = !!e.get("silent"), su(e, i), ou(e, i)
        }), o.unfinished |= a, au(t, e), A_(t._zr.dom, e)
    }

    function ru(t, e) {
        iw(Pw, function (i) {
            i(t, e)
        })
    }

    function au(t, e) {
        var i = t._zr, n = i.storage, r = 0;
        n.traverse(function () {
            r++
        }), r > e.get("hoverLayerThreshold") && !Up.node && e.eachSeries(function (e) {
            if (!e.preventUsingHoverLayer) {
                var i = t._chartsMap[e.__viewId];
                i.__alive && i.group.traverse(function (t) {
                    t.useHoverLayer = !0
                })
            }
        })
    }

    function ou(t, e) {
        var i = t.get("blendMode") || null;
        e.group.traverse(function (t) {
            t.isGroup || t.style.blend !== i && t.setStyle("blend", i), t.eachPendingDisplayable && t.eachPendingDisplayable(function (t) {
                t.setStyle("blend", i)
            })
        })
    }

    function su(t, e) {
        var i = t.get("z"), n = t.get("zlevel");
        e.group.traverse(function (t) {
            "group" !== t.type && (null != i && (t.z = i), null != n && (t.zlevel = n))
        })
    }

    function lu(t) {
        var e = t._coordSysMgr;
        return o(new Ss(t), {
            getCoordinateSystems: y(e.getCoordinateSystems, e), getComponentByElement: function (e) {
                for (; e;) {
                    var i = e.__ecComponentInfo;
                    if (null != i) return t._model.getComponent(i.mainType, i.index);
                    e = e.parent
                }
            }
        })
    }

    function uu() {
        this.eventInfo
    }

    function hu(t) {
        function e(t, e) {
            for (var i = 0; i < t.length; i++) {
                var n = t[i];
                n[a] = e
            }
        }

        var i = 0, n = 1, r = 2, a = "__connectUpdateStatus";
        iw(Dw, function (o, s) {
            t._messageCenter.on(s, function (o) {
                if (Ew[t.group] && t[a] !== i) {
                    if (o && o.escapeConnect) return;
                    var s = t.makeActionFromEvent(o), l = [];
                    iw(Bw, function (e) {
                        e !== t && e.group === t.group && l.push(e)
                    }), e(l, i), iw(l, function (t) {
                        t[a] !== n && t.dispatchAction(s)
                    }), e(l, r)
                }
            })
        })
    }

    function cu(t, e, i) {
        var n = gu(t);
        if (n) return n;
        var r = new Xl(t, e, i);
        return r.id = "ec_" + Nw++, Bw[r.id] = r, cr(t, Fw, r.id), hu(r), r
    }

    function du(t) {
        if (_(t)) {
            var e = t;
            t = null, iw(e, function (e) {
                null != e.group && (t = e.group)
            }), t = t || "g_" + Rw++, iw(e, function (e) {
                e.group = t
            })
        }
        return Ew[t] = !0, t
    }

    function fu(t) {
        Ew[t] = !1
    }

    function pu(t) {
        "string" == typeof t ? t = Bw[t] : t instanceof Xl || (t = gu(t)), t instanceof Xl && !t.isDisposed() && t.dispose()
    }

    function gu(t) {
        return Bw[dr(t, Fw)]
    }

    function mu(t) {
        return Bw[t]
    }

    function vu(t, e) {
        Ow[t] = e
    }

    function yu(t) {
        kw.push(t)
    }

    function xu(t, e) {
        Cu(Aw, t, e, uw)
    }

    function _u(t) {
        Pw.push(t)
    }

    function wu(t, e, i) {
        "function" == typeof e && (i = e, e = "");
        var n = rw(t) ? t.type : [t, t = {event: e}][0];
        t.event = (t.event || n).toLowerCase(), e = t.event, ew(Sw.test(n) && Sw.test(e)), Tw[n] || (Tw[n] = {
            action: i,
            actionInfo: t
        }), Dw[e] = n
    }

    function bu(t, e) {
        Ms.register(t, e)
    }

    function Su(t) {
        var e = Ms.get(t);
        return e ? e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice() : void 0
    }

    function Mu(t, e) {
        Cu(Lw, t, e, fw, "layout")
    }

    function Iu(t, e) {
        Cu(Lw, t, e, mw, "visual")
    }

    function Cu(t, e, i, n, r) {
        (nw(e) || rw(e)) && (i = e, e = n);
        var a = vl.wrapStageHandler(i, r);
        return a.__prio = e, a.__raw = i, t.push(a), a
    }

    function Tu(t, e) {
        zw[t] = e
    }

    function Du(t) {
        return Ax.extend(t)
    }

    function Au(t) {
        return v_.extend(t)
    }

    function ku(t) {
        return m_.extend(t)
    }

    function Pu(t) {
        return hl.extend(t)
    }

    function Lu(t) {
        i("createCanvas", t)
    }

    function Ou(t, e, i) {
        J_.registerMap(t, e, i)
    }

    function zu(t) {
        var e = J_.retrieveMap(t);
        return e && e[0] && {geoJson: e[0].geoJSON, specialAreas: e[0].specialAreas}
    }

    function Bu(t) {
        return t
    }

    function Eu(t, e, i, n, r) {
        this._old = t, this._new = e, this._oldKeyGetter = i || Bu, this._newKeyGetter = n || Bu, this.context = r
    }

    function Nu(t, e, i, n, r) {
        for (var a = 0; a < t.length; a++) {
            var o = "_ec_" + r[n](t[a], a), s = e[o];
            null == s ? (i.push(o), e[o] = a) : (s.length || (e[o] = s = [s]), s.push(a))
        }
    }

    function Ru(t) {
        var e = {}, i = e.encode = {}, n = R(), r = [], a = [],
            o = e.userOutput = {dimensionNames: t.dimensions.slice(), encode: {}};
        f(t.dimensions, function (e) {
            var s = t.getDimensionInfo(e), l = s.coordDim;
            if (l) {
                var u = s.coordDimIndex;
                Fu(i, l)[u] = e, s.isExtraCoord || (n.set(l, 1), Gu(s.type) && (r[0] = e), Fu(o.encode, l)[u] = s.index), s.defaultTooltip && a.push(e)
            }
            Hw.each(function (t, e) {
                var n = Fu(i, e), r = s.otherDims[e];
                null != r && r !== !1 && (n[r] = s.name)
            })
        });
        var s = [], l = {};
        n.each(function (t, e) {
            var n = i[e];
            l[e] = n[0], s = s.concat(n)
        }), e.dataDimsOnCoord = s, e.encodeFirstDimNotExtra = l;
        var u = i.label;
        u && u.length && (r = u.slice());
        var h = i.tooltip;
        return h && h.length ? a = h.slice() : a.length || (a = r.slice()), i.defaultedLabel = r, i.defaultedTooltip = a, e
    }

    function Fu(t, e) {
        return t.hasOwnProperty(e) || (t[e] = []), t[e]
    }

    function Vu(t) {
        return "category" === t ? "ordinal" : "time" === t ? "time" : "float"
    }

    function Gu(t) {
        return !("ordinal" === t || "time" === t)
    }

    function Hu(t) {
        null != t && o(this, t), this.otherDims = {}
    }

    function Wu(t) {
        return t._rawCount > 65535 ? jw : Kw
    }

    function Xu(t) {
        var e = t.constructor;
        return e === Array ? t.slice() : new e(t)
    }

    function Uu(t, e) {
        f($w.concat(e.__wrappedMethods || []), function (i) {
            e.hasOwnProperty(i) && (t[i] = e[i])
        }), t.__wrappedMethods = e.__wrappedMethods, f(Qw, function (i) {
            t[i] = n(e[i])
        }), t._calculationInfo = o(e._calculationInfo)
    }

    function Yu(t, e, i, n, r) {
        var a = qw[e.type], o = n - 1, s = e.name, l = t[s][o];
        if (l && l.length < i) {
            for (var u = new a(Math.min(r - o * i, i)), h = 0; h < l.length; h++) u[h] = l[h];
            t[s][o] = u
        }
        for (var c = n * i; r > c; c += i) t[s].push(new a(Math.min(r - c, i)))
    }

    function qu(t) {
        var e = t._invertedIndicesMap;
        f(e, function (i, n) {
            var r = t._dimensionInfos[n], a = r.ordinalMeta;
            if (a) {
                i = e[n] = new Zw(a.categories.length);
                for (var o = 0; o < i.length; o++) i[o] = Uw;
                for (var o = 0; o < t._count; o++) i[t.get(n, o)] = o
            }
        })
    }

    function ju(t, e, i) {
        var n;
        if (null != e) {
            var r = t._chunkSize, a = Math.floor(i / r), o = i % r, s = t.dimensions[e], l = t._storage[s][a];
            if (l) {
                n = l[o];
                var u = t._dimensionInfos[s].ordinalMeta;
                u && u.categories.length && (n = u.categories[n])
            }
        }
        return n
    }

    function Zu(t) {
        return t
    }

    function Ku(t) {
        return t < this._count && t >= 0 ? this._indices[t] : -1
    }

    function $u(t, e) {
        var i = t._idList[e];
        return null == i && (i = ju(t, t._idDimIdx, e)), null == i && (i = Yw + e), i
    }

    function Qu(t) {
        return _(t) || (t = [t]), t
    }

    function Ju(t, e) {
        var i = t.dimensions, n = new Jw(p(i, t.getDimensionInfo, t), t.hostModel);
        Uu(n, t);
        for (var r = n._storage = {}, a = t._storage, o = 0; o < i.length; o++) {
            var s = i[o];
            a[s] && (u(e, s) >= 0 ? (r[s] = th(a[s]), n._rawExtent[s] = eh(), n._extent[s] = null) : r[s] = a[s])
        }
        return n
    }

    function th(t) {
        for (var e = new Array(t.length), i = 0; i < t.length; i++) e[i] = Xu(t[i]);
        return e
    }

    function eh() {
        return [1 / 0, -1 / 0]
    }

    function ih(t, e, i) {
        function r(t, e, i) {
            null != Hw.get(e) ? t.otherDims[e] = i : (t.coordDim = e, t.coordDimIndex = i, u.set(e, !0))
        }

        is.isInstance(e) || (e = is.seriesDataToSource(e)), i = i || {}, t = (t || []).slice();
        for (var a = (i.dimsDef || []).slice(), l = R(), u = R(), h = [], c = nh(e, t, a, i.dimCount), d = 0; c > d; d++) {
            var p = a[d] = o({}, S(a[d]) ? a[d] : {name: a[d]}), g = p.name, m = h[d] = new Hu;
            null != g && null == l.get(g) && (m.name = m.displayName = g, l.set(g, d)), null != p.type && (m.type = p.type), null != p.displayName && (m.displayName = p.displayName)
        }
        var v = i.encodeDef;
        !v && i.encodeDefaulter && (v = i.encodeDefaulter(e, c)), v = R(v), v.each(function (t, e) {
            if (t = Jn(t).slice(), 1 === t.length && !b(t[0]) && t[0] < 0) return void v.set(e, !1);
            var i = v.set(e, []);
            f(t, function (t, n) {
                b(t) && (t = l.get(t)), null != t && c > t && (i[n] = t, r(h[t], e, n))
            })
        });
        var y = 0;
        f(t, function (t) {
            var e, t, i, a;
            if (b(t)) e = t, t = {}; else {
                e = t.name;
                var o = t.ordinalMeta;
                t.ordinalMeta = null, t = n(t), t.ordinalMeta = o, i = t.dimsDef, a = t.otherDims, t.name = t.coordDim = t.coordDimIndex = t.dimsDef = t.otherDims = null
            }
            var l = v.get(e);
            if (l !== !1) {
                var l = Jn(l);
                if (!l.length) for (var u = 0; u < (i && i.length || 1); u++) {
                    for (; y < h.length && null != h[y].coordDim;) y++;
                    y < h.length && l.push(y++)
                }
                f(l, function (n, o) {
                    var l = h[n];
                    if (r(s(l, t), e, o), null == l.name && i) {
                        var u = i[o];
                        !S(u) && (u = {name: u}), l.name = l.displayName = u.name, l.defaultTooltip = u.defaultTooltip
                    }
                    a && s(l.otherDims, a)
                })
            }
        });
        var x = i.generateCoord, _ = i.generateCoordCount, w = null != _;
        _ = x ? _ || 1 : 0;
        for (var M = x || "value", I = 0; c > I; I++) {
            var m = h[I] = h[I] || new Hu, C = m.coordDim;
            null == C && (m.coordDim = rh(M, u, w), m.coordDimIndex = 0, (!x || 0 >= _) && (m.isExtraCoord = !0), _--), null == m.name && (m.name = rh(m.coordDim, l)), null != m.type || ps(e, I, m.name) !== Hx.Must && (!m.isExtraCoord || null == m.otherDims.itemName && null == m.otherDims.seriesName) || (m.type = "ordinal")
        }
        return h
    }

    function nh(t, e, i, n) {
        var r = Math.max(t.dimensionsDetectCount || 1, e.length, i.length, n || 0);
        return f(e, function (t) {
            var e = t.dimsDef;
            e && (r = Math.max(r, e.length))
        }), r
    }

    function rh(t, e, i) {
        if (i || null != e.get(t)) {
            for (var n = 0; null != e.get(t + n);) n++;
            t += n
        }
        return e.set(t, !0), t
    }

    function ah(t) {
        this.coordSysName = t, this.coordSysDims = [], this.axisMap = R(), this.categoryAxisMap = R(), this.firstCategoryDimIndex = null
    }

    function oh(t) {
        var e = t.get("coordinateSystem"), i = new ah(e), n = nb[e];
        return n ? (n(t, i, i.axisMap, i.categoryAxisMap), i) : void 0
    }

    function sh(t) {
        return "category" === t.get("type")
    }

    function lh(t, e, i) {
        i = i || {};
        var n, r, a, o, s = i.byIndex, l = i.stackedCoordDimension, u = !(!t || !t.get("stack"));
        if (f(e, function (t, i) {
            b(t) && (e[i] = t = {name: t}), u && !t.isExtraCoord && (s || n || !t.ordinalMeta || (n = t), r || "ordinal" === t.type || "time" === t.type || l && l !== t.coordDim || (r = t))
        }), !r || s || n || (s = !0), r) {
            a = "__\x00ecstackresult", o = "__\x00ecstackedover", n && (n.createInvertedIndices = !0);
            var h = r.coordDim, c = r.type, d = 0;
            f(e, function (t) {
                t.coordDim === h && d++
            }), e.push({
                name: a,
                coordDim: h,
                coordDimIndex: d,
                type: c,
                isExtraCoord: !0,
                isCalculationCoord: !0
            }), d++, e.push({name: o, coordDim: o, coordDimIndex: d, type: c, isExtraCoord: !0, isCalculationCoord: !0})
        }
        return {
            stackedDimension: r && r.name,
            stackedByDimension: n && n.name,
            isStackedByIndex: s,
            stackedOverDimension: o,
            stackResultDimension: a
        }
    }

    function uh(t, e) {
        return !!e && e === t.getCalculationInfo("stackedDimension")
    }

    function hh(t, e) {
        return uh(t, e) ? t.getCalculationInfo("stackResultDimension") : e
    }

    function ch(t, e, i) {
        i = i || {}, is.isInstance(t) || (t = is.seriesDataToSource(t));
        var n, r = e.get("coordinateSystem"), a = Ms.get(r), o = oh(e);
        o && (n = p(o.coordSysDims, function (t) {
            var e = {name: t}, i = o.axisMap.get(t);
            if (i) {
                var n = i.get("type");
                e.type = Vu(n)
            }
            return e
        })), n || (n = a && (a.getDimensionsInfo ? a.getDimensionsInfo() : a.dimensions.slice()) || ["x", "y"]);
        var s, l, u = ib(t, {
            coordDimensions: n,
            generateCoord: i.generateCoord,
            encodeDefaulter: i.useEncodeDefaulter ? x(cs, n, e) : null
        });
        o && f(u, function (t, e) {
            var i = t.coordDim, n = o.categoryAxisMap.get(i);
            n && (null == s && (s = e), t.ordinalMeta = n.getOrdinalMeta()), null != t.otherDims.itemName && (l = !0)
        }), l || null == s || (u[s].otherDims.itemName = 0);
        var h = lh(e, u), c = new Jw(u, e);
        c.setCalculationInfo(h);
        var d = null != s && dh(t) ? function (t, e, i, n) {
            return n === s ? i : this.defaultDimValueGetter(t, e, i, n)
        } : null;
        return c.hasItemOption = !1, c.initData(t, null, d), c
    }

    function dh(t) {
        if (t.sourceFormat === zx) {
            var e = fh(t.data || []);
            return null != e && !_(er(e))
        }
    }

    function fh(t) {
        for (var e = 0; e < t.length && null == t[e];) e++;
        return t[e]
    }

    function ph(t) {
        this._setting = t || {}, this._extent = [1 / 0, -1 / 0], this._interval = 0, this.init && this.init.apply(this, arguments)
    }

    function gh(t) {
        this.categories = t.categories || [], this._needCollect = t.needCollect, this._deduplication = t.deduplication, this._map
    }

    function mh(t) {
        return t._map || (t._map = R(t.categories))
    }

    function vh(t) {
        return S(t) && null != t.value ? t.value : t + ""
    }

    function yh(t, e, i, n) {
        var r = {}, a = t[1] - t[0], o = r.interval = Oo(a / e, !0);
        null != i && i > o && (o = r.interval = i), null != n && o > n && (o = r.interval = n);
        var s = r.intervalPrecision = xh(o),
            l = r.niceTickExtent = [sb(Math.ceil(t[0] / o) * o, s), sb(Math.floor(t[1] / o) * o, s)];
        return wh(l, t), r
    }

    function xh(t) {
        return Io(t) + 2
    }

    function _h(t, e, i) {
        t[e] = Math.max(Math.min(t[e], i[1]), i[0])
    }

    function wh(t, e) {
        !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), _h(t, 0, e), _h(t, 1, e), t[0] > t[1] && (t[0] = t[1])
    }

    function bh(t) {
        return t.get("stack") || hb + t.seriesIndex
    }

    function Sh(t) {
        return t.dim + t.index
    }

    function Mh(t, e) {
        var i = [];
        return e.eachSeriesByType(t, function (t) {
            kh(t) && !Ph(t) && i.push(t)
        }), i
    }

    function Ih(t) {
        var e = {};
        f(t, function (t) {
            var i = t.coordinateSystem, n = i.getBaseAxis();
            if ("time" === n.type || "value" === n.type) for (var r = t.getData(), a = n.dim + "_" + n.index, o = r.mapDimension(n.dim), s = 0, l = r.count(); l > s; ++s) {
                var u = r.get(o, s);
                e[a] ? e[a].push(u) : e[a] = [u]
            }
        });
        var i = [];
        for (var n in e) if (e.hasOwnProperty(n)) {
            var r = e[n];
            if (r) {
                r.sort(function (t, e) {
                    return t - e
                });
                for (var a = null, o = 1; o < r.length; ++o) {
                    var s = r[o] - r[o - 1];
                    s > 0 && (a = null === a ? s : Math.min(a, s))
                }
                i[n] = a
            }
        }
        return i
    }

    function Ch(t) {
        var e = Ih(t), i = [];
        return f(t, function (t) {
            var n, r = t.coordinateSystem, a = r.getBaseAxis(), o = a.getExtent();
            if ("category" === a.type) n = a.getBandWidth(); else if ("value" === a.type || "time" === a.type) {
                var s = a.dim + "_" + a.index, l = e[s], u = Math.abs(o[1] - o[0]), h = a.scale.getExtent(),
                    c = Math.abs(h[1] - h[0]);
                n = l ? u / c * l : u
            } else {
                var d = t.getData();
                n = Math.abs(o[1] - o[0]) / d.count()
            }
            var f = wo(t.get("barWidth"), n), p = wo(t.get("barMaxWidth"), n), g = wo(t.get("barMinWidth") || 1, n),
                m = t.get("barGap"), v = t.get("barCategoryGap");
            i.push({
                bandWidth: n,
                barWidth: f,
                barMaxWidth: p,
                barMinWidth: g,
                barGap: m,
                barCategoryGap: v,
                axisKey: Sh(a),
                stackId: bh(t)
            })
        }), Th(i)
    }

    function Th(t) {
        var e = {};
        f(t, function (t) {
            var i = t.axisKey, n = t.bandWidth, r = e[i] || {
                bandWidth: n,
                remainedWidth: n,
                autoWidthCount: 0,
                categoryGap: "20%",
                gap: "30%",
                stacks: {}
            }, a = r.stacks;
            e[i] = r;
            var o = t.stackId;
            a[o] || r.autoWidthCount++, a[o] = a[o] || {width: 0, maxWidth: 0};
            var s = t.barWidth;
            s && !a[o].width && (a[o].width = s, s = Math.min(r.remainedWidth, s), r.remainedWidth -= s);
            var l = t.barMaxWidth;
            l && (a[o].maxWidth = l);
            var u = t.barMinWidth;
            u && (a[o].minWidth = u);
            var h = t.barGap;
            null != h && (r.gap = h);
            var c = t.barCategoryGap;
            null != c && (r.categoryGap = c)
        });
        var i = {};
        return f(e, function (t, e) {
            i[e] = {};
            var n = t.stacks, r = t.bandWidth, a = wo(t.categoryGap, r), o = wo(t.gap, 1), s = t.remainedWidth,
                l = t.autoWidthCount, u = (s - a) / (l + (l - 1) * o);
            u = Math.max(u, 0), f(n, function (t) {
                var e = t.maxWidth, i = t.minWidth;
                if (t.width) {
                    var n = t.width;
                    e && (n = Math.min(n, e)), i && (n = Math.max(n, i)), t.width = n, s -= n + o * n, l--
                } else {
                    var n = u;
                    e && n > e && (n = Math.min(e, s)), i && i > n && (n = i), n !== u && (t.width = n, s -= n + o * n, l--)
                }
            }), u = (s - a) / (l + (l - 1) * o), u = Math.max(u, 0);
            var h, c = 0;
            f(n, function (t) {
                t.width || (t.width = u), h = t, c += t.width * (1 + o)
            }), h && (c -= h.width * o);
            var d = -c / 2;
            f(n, function (t, n) {
                i[e][n] = i[e][n] || {bandWidth: r, offset: d, width: t.width}, d += t.width * (1 + o)
            })
        }), i
    }

    function Dh(t, e, i) {
        if (t && e) {
            var n = t[Sh(e)];
            return null != n && null != i && (n = n[bh(i)]), n
        }
    }

    function Ah(t, e) {
        var i = Mh(t, e), n = Ch(i), r = {};
        f(i, function (t) {
            var e = t.getData(), i = t.coordinateSystem, a = i.getBaseAxis(), o = bh(t), s = n[Sh(a)][o], l = s.offset,
                u = s.width, h = i.getOtherAxis(a), c = t.get("barMinHeight") || 0;
            r[o] = r[o] || [], e.setLayout({bandWidth: s.bandWidth, offset: l, size: u});
            for (var d = e.mapDimension(h.dim), f = e.mapDimension(a.dim), p = uh(e, d), g = h.isHorizontal(), m = Lh(a, h, p), v = 0, y = e.count(); y > v; v++) {
                var x = e.get(d, v), _ = e.get(f, v), w = x >= 0 ? "p" : "n", b = m;
                p && (r[o][_] || (r[o][_] = {p: m, n: m}), b = r[o][_][w]);
                var S, M, I, C;
                if (g) {
                    var T = i.dataToPoint([x, _]);
                    S = b, M = T[1] + l, I = T[0] - m, C = u, Math.abs(I) < c && (I = (0 > I ? -1 : 1) * c), isNaN(I) || p && (r[o][_][w] += I)
                } else {
                    var T = i.dataToPoint([_, x]);
                    S = T[0] + l, M = b, I = u, C = T[1] - m, Math.abs(C) < c && (C = (0 >= C ? -1 : 1) * c), isNaN(C) || p && (r[o][_][w] += C)
                }
                e.setItemLayout(v, {x: S, y: M, width: I, height: C})
            }
        }, this)
    }

    function kh(t) {
        return t.coordinateSystem && "cartesian2d" === t.coordinateSystem.type
    }

    function Ph(t) {
        return t.pipelineContext && t.pipelineContext.large
    }

    function Lh(t, e) {
        return e.toGlobalCoord(e.dataToCoord("log" === e.type ? 1 : 0))
    }

    function Oh(t, e) {
        return Tb(t, Cb(e))
    }

    function zh(t, e) {
        var i, n, r, a = t.type, o = e.getMin(), s = e.getMax(), l = t.getExtent();
        "ordinal" === a ? i = e.getCategories().length : (n = e.get("boundaryGap"), _(n) || (n = [n || 0, n || 0]), "boolean" == typeof n[0] && (n = [0, 0]), n[0] = wo(n[0], 1), n[1] = wo(n[1], 1), r = l[1] - l[0] || Math.abs(l[0])), "dataMin" === o ? o = l[0] : "function" == typeof o && (o = o({
            min: l[0],
            max: l[1]
        })), "dataMax" === s ? s = l[1] : "function" == typeof s && (s = s({min: l[0], max: l[1]}));
        var u = null != o, h = null != s;
        null == o && (o = "ordinal" === a ? i ? 0 : 0 / 0 : l[0] - n[0] * r), null == s && (s = "ordinal" === a ? i ? i - 1 : 0 / 0 : l[1] + n[1] * r), (null == o || !isFinite(o)) && (o = 0 / 0), (null == s || !isFinite(s)) && (s = 0 / 0), t.setBlank(T(o) || T(s) || "ordinal" === a && !t.getOrdinalMeta().categories.length), e.getNeedCrossZero() && (o > 0 && s > 0 && !u && (o = 0), 0 > o && 0 > s && !h && (s = 0));
        var c = e.ecModel;
        if (c && "time" === a) {
            var d, p = Mh("bar", c);
            if (f(p, function (t) {
                d |= t.getBaseAxis() === e.axis
            }), d) {
                var g = Ch(p), m = Bh(o, s, e, g);
                o = m.min, s = m.max
            }
        }
        return {extent: [o, s], fixMin: u, fixMax: h}
    }

    function Bh(t, e, i, n) {
        var r = i.axis.getExtent(), a = r[1] - r[0], o = Dh(n, i.axis);
        if (void 0 === o) return {min: t, max: e};
        var s = 1 / 0;
        f(o, function (t) {
            s = Math.min(t.offset, s)
        });
        var l = -1 / 0;
        f(o, function (t) {
            l = Math.max(t.offset + t.width, l)
        }), s = Math.abs(s), l = Math.abs(l);
        var u = s + l, h = e - t, c = 1 - (s + l) / a, d = h / c - h;
        return e += d * (l / u), t -= d * (s / u), {min: t, max: e}
    }

    function Eh(t, e) {
        var i = zh(t, e), n = i.extent, r = e.get("splitNumber");
        "log" === t.type && (t.base = e.get("logBase"));
        var a = t.type;
        t.setExtent(n[0], n[1]), t.niceExtent({
            splitNumber: r,
            fixMin: i.fixMin,
            fixMax: i.fixMax,
            minInterval: "interval" === a || "time" === a ? e.get("minInterval") : null,
            maxInterval: "interval" === a || "time" === a ? e.get("maxInterval") : null
        });
        var o = e.get("interval");
        null != o && t.setInterval && t.setInterval(o)
    }

    function Nh(t, e) {
        if (e = e || t.get("type")) switch (e) {
            case"category":
                return new ob(t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(), [1 / 0, -1 / 0]);
            case"value":
                return new ub;
            default:
                return (ph.getClass(e) || ub).create(t)
        }
    }

    function Rh(t) {
        var e = t.scale.getExtent(), i = e[0], n = e[1];
        return !(i > 0 && n > 0 || 0 > i && 0 > n)
    }

    function Fh(t) {
        var e = t.getLabelModel().get("formatter"), i = "category" === t.type ? t.scale.getExtent()[0] : null;
        return "string" == typeof e ? e = function (e) {
            return function (i) {
                return i = t.scale.getLabel(i), e.replace("{value}", null != i ? i : "")
            }
        }(e) : "function" == typeof e ? function (n, r) {
            return null != i && (r = n - i), e(Vh(t, n), r)
        } : function (e) {
            return t.scale.getLabel(e)
        }
    }

    function Vh(t, e) {
        return "category" === t.type ? t.scale.getLabel(e) : e
    }

    function Gh(t) {
        var e = t.model, i = t.scale;
        if (e.get("axisLabel.show") && !i.isBlank()) {
            var n, r, a = "category" === t.type, o = i.getExtent();
            a ? r = i.count() : (n = i.getTicks(), r = n.length);
            var s, l = t.getLabelModel(), u = Fh(t), h = 1;
            r > 40 && (h = Math.ceil(r / 40));
            for (var c = 0; r > c; c += h) {
                var d = n ? n[c] : o[0] + c, f = u(d), p = l.getTextRect(f), g = Hh(p, l.get("rotate") || 0);
                s ? s.union(g) : s = g
            }
            return s
        }
    }

    function Hh(t, e) {
        var i = e * Math.PI / 180, n = t.plain(), r = n.width, a = n.height,
            o = r * Math.abs(Math.cos(i)) + Math.abs(a * Math.sin(i)),
            s = r * Math.abs(Math.sin(i)) + Math.abs(a * Math.cos(i)), l = new Ii(n.x, n.y, o, s);
        return l
    }

    function Wh(t) {
        var e = t.get("interval");
        return null == e ? "auto" : e
    }

    function Xh(t) {
        return "category" === t.type && 0 === Wh(t.getLabelModel())
    }

    function Uh(t, e) {
        if ("image" !== this.type) {
            var i = this.style, n = this.shape;
            n && "line" === n.symbolType ? i.stroke = t : this.__isEmptyBrush ? (i.stroke = t, i.fill = e || "#fff") : (i.fill && (i.fill = t), i.stroke && (i.stroke = t)), this.dirty(!1)
        }
    }

    function Yh(t, e, i, n, r, a, o) {
        var s = 0 === t.indexOf("empty");
        s && (t = t.substr(5, 1).toLowerCase() + t.substr(6));
        var l;
        return l = 0 === t.indexOf("image://") ? xa(t.slice(8), new Ii(e, i, n, r), o ? "center" : "cover") : 0 === t.indexOf("path://") ? ya(t.slice(7), {}, new Ii(e, i, n, r), o ? "center" : "cover") : new Gb({
            shape: {
                symbolType: t,
                x: e,
                y: i,
                width: n,
                height: r
            }
        }), l.__isEmptyBrush = s, l.setColor = Uh, l.setColor(a), l
    }

    function qh(t) {
        return ch(t.getSource(), t)
    }

    function jh(t, e) {
        var i = e;
        fo.isInstance(e) || (i = new fo(e), c(i, Ob));
        var n = Nh(i);
        return n.setExtent(t[0], t[1]), Eh(n, i), n
    }

    function Zh(t) {
        c(t, Ob)
    }

    function Kh(t, e) {
        return Math.abs(t - e) < Xb
    }

    function $h(t, e, i) {
        var n = 0, r = t[0];
        if (!r) return !1;
        for (var a = 1; a < t.length; a++) {
            var o = t[a];
            n += Ur(r[0], r[1], o[0], o[1], e, i), r = o
        }
        var s = t[0];
        return Kh(r[0], s[0]) && Kh(r[1], s[1]) || (n += Ur(r[0], r[1], s[0], s[1], e, i)), 0 !== n
    }

    function Qh(t, e, i) {
        if (this.name = t, this.geometries = e, i) i = [i[0], i[1]]; else {
            var n = this.getBoundingRect();
            i = [n.x + n.width / 2, n.y + n.height / 2]
        }
        this.center = i
    }

    function Jh(t) {
        if (!t.UTF8Encoding) return t;
        var e = t.UTF8Scale;
        null == e && (e = 1024);
        for (var i = t.features, n = 0; n < i.length; n++) for (var r = i[n], a = r.geometry, o = a.coordinates, s = a.encodeOffsets, l = 0; l < o.length; l++) {
            var u = o[l];
            if ("Polygon" === a.type) o[l] = tc(u, s[l], e); else if ("MultiPolygon" === a.type) for (var h = 0; h < u.length; h++) {
                var c = u[h];
                u[h] = tc(c, s[l][h], e)
            }
        }
        return t.UTF8Encoding = !1, t
    }

    function tc(t, e, i) {
        for (var n = [], r = e[0], a = e[1], o = 0; o < t.length; o += 2) {
            var s = t.charCodeAt(o) - 64, l = t.charCodeAt(o + 1) - 64;
            s = s >> 1 ^ -(1 & s), l = l >> 1 ^ -(1 & l), s += r, l += a, r = s, a = l, n.push([s / i, l / i])
        }
        return n
    }

    function ec(t) {
        return "category" === t.type ? nc(t) : oc(t)
    }

    function ic(t, e) {
        return "category" === t.type ? ac(t, e) : {ticks: t.scale.getTicks()}
    }

    function nc(t) {
        var e = t.getLabelModel(), i = rc(t, e);
        return !e.get("show") || t.scale.isBlank() ? {labels: [], labelCategoryInterval: i.labelCategoryInterval} : i
    }

    function rc(t, e) {
        var i = sc(t, "labels"), n = Wh(e), r = lc(i, n);
        if (r) return r;
        var a, o;
        return w(n) ? a = pc(t, n) : (o = "auto" === n ? hc(t) : n, a = fc(t, o)), uc(i, n, {
            labels: a,
            labelCategoryInterval: o
        })
    }

    function ac(t, e) {
        var i = sc(t, "ticks"), n = Wh(e), r = lc(i, n);
        if (r) return r;
        var a, o;
        if ((!e.get("show") || t.scale.isBlank()) && (a = []), w(n)) a = pc(t, n, !0); else if ("auto" === n) {
            var s = rc(t, t.getLabelModel());
            o = s.labelCategoryInterval, a = p(s.labels, function (t) {
                return t.tickValue
            })
        } else o = n, a = fc(t, o, !0);
        return uc(i, n, {ticks: a, tickCategoryInterval: o})
    }

    function oc(t) {
        var e = t.scale.getTicks(), i = Fh(t);
        return {
            labels: p(e, function (e, n) {
                return {formattedLabel: i(e, n), rawLabel: t.scale.getLabel(e), tickValue: e}
            })
        }
    }

    function sc(t, e) {
        return Yb(t)[e] || (Yb(t)[e] = [])
    }

    function lc(t, e) {
        for (var i = 0; i < t.length; i++) if (t[i].key === e) return t[i].value
    }

    function uc(t, e, i) {
        return t.push({key: e, value: i}), i
    }

    function hc(t) {
        var e = Yb(t).autoInterval;
        return null != e ? e : Yb(t).autoInterval = t.calculateCategoryInterval()
    }

    function cc(t) {
        var e = dc(t), i = Fh(t), n = (e.axisRotate - e.labelRotate) / 180 * Math.PI, r = t.scale, a = r.getExtent(),
            o = r.count();
        if (a[1] - a[0] < 1) return 0;
        var s = 1;
        o > 40 && (s = Math.max(1, Math.floor(o / 40)));
        for (var l = a[0], u = t.dataToCoord(l + 1) - t.dataToCoord(l), h = Math.abs(u * Math.cos(n)), c = Math.abs(u * Math.sin(n)), d = 0, f = 0; l <= a[1]; l += s) {
            var p = 0, g = 0, m = Xi(i(l), e.font, "center", "top");
            p = 1.3 * m.width, g = 1.3 * m.height, d = Math.max(d, p, 7), f = Math.max(f, g, 7)
        }
        var v = d / h, y = f / c;
        isNaN(v) && (v = 1 / 0), isNaN(y) && (y = 1 / 0);
        var x = Math.max(0, Math.floor(Math.min(v, y))), _ = Yb(t.model), w = t.getExtent(), b = _.lastAutoInterval,
            S = _.lastTickCount;
        return null != b && null != S && Math.abs(b - x) <= 1 && Math.abs(S - o) <= 1 && b > x && _.axisExtend0 === w[0] && _.axisExtend1 === w[1] ? x = b : (_.lastTickCount = o, _.lastAutoInterval = x, _.axisExtend0 = w[0], _.axisExtend1 = w[1]), x
    }

    function dc(t) {
        var e = t.getLabelModel();
        return {
            axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0,
            labelRotate: e.get("rotate") || 0,
            font: e.getFont()
        }
    }

    function fc(t, e, i) {
        function n(t) {
            l.push(i ? t : {formattedLabel: r(t), rawLabel: a.getLabel(t), tickValue: t})
        }

        var r = Fh(t), a = t.scale, o = a.getExtent(), s = t.getLabelModel(), l = [], u = Math.max((e || 0) + 1, 1),
            h = o[0], c = a.count();
        0 !== h && u > 1 && c / u > 2 && (h = Math.round(Math.ceil(h / u) * u));
        var d = Xh(t), f = s.get("showMinLabel") || d, p = s.get("showMaxLabel") || d;
        f && h !== o[0] && n(o[0]);
        for (var g = h; g <= o[1]; g += u) n(g);
        return p && g - u !== o[1] && n(o[1]), l
    }

    function pc(t, e, i) {
        var n = t.scale, r = Fh(t), a = [];
        return f(n.getTicks(), function (t) {
            var o = n.getLabel(t);
            e(t, o) && a.push(i ? t : {formattedLabel: r(t), rawLabel: o, tickValue: t})
        }), a
    }

    function gc(t, e) {
        var i = t[1] - t[0], n = e, r = i / n / 2;
        t[0] += r, t[1] -= r
    }

    function mc(t, e, i, n) {
        function r(t, e) {
            return t = bo(t), e = bo(e), d ? t > e : e > t
        }

        var a = e.length;
        if (t.onBand && !i && a) {
            var o, s, l = t.getExtent();
            if (1 === a) e[0].coord = l[0], o = e[1] = {coord: l[0]}; else {
                var u = e[a - 1].tickValue - e[0].tickValue, h = (e[a - 1].coord - e[0].coord) / u;
                f(e, function (t) {
                    t.coord -= h / 2
                });
                var c = t.scale.getExtent();
                s = 1 + c[1] - e[a - 1].tickValue, o = {coord: e[a - 1].coord + h * s}, e.push(o)
            }
            var d = l[0] > l[1];
            r(e[0].coord, l[0]) && (n ? e[0].coord = l[0] : e.shift()), n && r(l[0], e[0].coord) && e.unshift({coord: l[0]}), r(l[1], o.coord) && (n ? o.coord = l[1] : e.pop()), n && r(o.coord, l[1]) && e.push({coord: l[1]})
        }
    }

    function vc(t) {
        return this._axes[t]
    }

    function yc(t) {
        Qb.call(this, t)
    }

    function xc(t, e) {
        return e.type || (e.data ? "category" : "value")
    }

    function _c(t, e) {
        return t.getCoordSysModel() === e
    }

    function wc(t, e, i) {
        this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this._initCartesian(t, e, i), this.model = t
    }

    function bc(t, e, i, n) {
        function r(t) {
            return t.dim + "_" + t.index
        }

        i.getAxesOnZeroOf = function () {
            return a ? [a] : []
        };
        var a, o = t[e], s = i.model, l = s.get("axisLine.onZero"), u = s.get("axisLine.onZeroAxisIndex");
        if (l) {
            if (null != u) Sc(o[u]) && (a = o[u]); else for (var h in o) if (o.hasOwnProperty(h) && Sc(o[h]) && !n[r(o[h])]) {
                a = o[h];
                break
            }
            a && (n[r(a)] = !0)
        }
    }

    function Sc(t) {
        return t && "category" !== t.type && "time" !== t.type && Rh(t)
    }

    function Mc(t, e) {
        var i = t.getExtent(), n = i[0] + i[1];
        t.toGlobalCoord = "x" === t.dim ? function (t) {
            return t + e
        } : function (t) {
            return n - t + e
        }, t.toLocalCoord = "x" === t.dim ? function (t) {
            return t - e
        } : function (t) {
            return n - t + e
        }
    }

    function Ic(t) {
        return p(sS, function (e) {
            var i = t.getReferringComponents(e)[0];
            return i
        })
    }

    function Cc(t) {
        return "cartesian2d" === t.get("coordinateSystem")
    }

    function Tc(t, e) {
        var i = t.mapDimension("defaultedLabel", !0), n = i.length;
        if (1 === n) return Ks(t, e, i[0]);
        if (n) {
            for (var r = [], a = 0; a < i.length; a++) {
                var o = Ks(t, e, i[a]);
                r.push(o)
            }
            return r.join(" ")
        }
    }

    function Dc(t, e, i, n, r, a) {
        var o = i.getModel("label"), s = i.getModel("emphasis.label");
        Ga(t, e, o, s, {
            labelFetcher: r,
            labelDataIndex: a,
            defaultText: Tc(r.getData(), a),
            isRectText: !0,
            autoColor: n
        }), Ac(t), Ac(e)
    }

    function Ac(t, e) {
        "outside" === t.textPosition && (t.textPosition = e)
    }

    function kc(t, e, i) {
        var n = t.getArea(), r = t.getBaseAxis().isHorizontal(), a = n.x, o = n.y, s = n.width, l = n.height,
            u = i.get("lineStyle.width") || 2;
        a -= u / 2, o -= u / 2, s += u, l += u, a = Math.floor(a), s = Math.round(s);
        var h = new Ly({shape: {x: a, y: o, width: s, height: l}});
        return e && (h.shape[r ? "width" : "height"] = 0, to(h, {shape: {width: s, height: l}}, i)), h
    }

    function Pc(t, e, i) {
        var n = t.getArea(), r = new My({
            shape: {
                cx: bo(t.cx, 1),
                cy: bo(t.cy, 1),
                r0: bo(n.r0, 1),
                r: bo(n.r, 1),
                startAngle: n.startAngle,
                endAngle: n.endAngle,
                clockwise: n.clockwise
            }
        });
        return e && (r.shape.endAngle = n.startAngle, to(r, {shape: {endAngle: n.endAngle}}, i)), r
    }

    function Lc(t, e, i) {
        return t ? "polar" === t.type ? Pc(t, e, i) : "cartesian2d" === t.type ? kc(t, e, i) : null : null
    }

    function Oc(t, e) {
        var i = t.getArea && t.getArea();
        if ("cartesian2d" === t.type) {
            var n = t.getBaseAxis();
            if ("category" !== n.type || !n.onBand) {
                var r = e.getLayout("bandWidth");
                n.isHorizontal() ? (i.x -= r, i.width += 2 * r) : (i.y -= r, i.height += 2 * r)
            }
        }
        return i
    }

    function zc(t, e, i) {
        i.style.text = null, Ja(i, {shape: {width: 0}}, e, t, function () {
            i.parent && i.parent.remove(i)
        })
    }

    function Bc(t, e, i) {
        i.style.text = null, Ja(i, {shape: {r: i.shape.r0}}, e, t, function () {
            i.parent && i.parent.remove(i)
        })
    }

    function Ec(t) {
        return null != t.startAngle && null != t.endAngle && t.startAngle === t.endAngle
    }

    function Nc(t, e, i, n, r, a, o, l) {
        var u = e.getItemVisual(i, "color"), h = e.getItemVisual(i, "opacity"), c = e.getVisual("borderColor"),
            d = n.getModel("itemStyle"), f = n.getModel("emphasis.itemStyle").getBarItemStyle();
        l || t.setShape("r", d.get("barBorderRadius") || 0), t.useStyle(s({
            stroke: Ec(r) ? "none" : c,
            fill: Ec(r) ? "none" : u,
            opacity: h
        }, d.getBarItemStyle()));
        var p = n.getShallow("cursor");
        p && t.attr("cursor", p);
        var g = o ? r.height > 0 ? "bottom" : "top" : r.width > 0 ? "left" : "right";
        l || Dc(t.style, f, n, u, a, i, g), Ec(r) && (f.fill = f.stroke = "none"), Na(t, f)
    }

    function Rc(t, e) {
        var i = t.get(dS) || 0, n = isNaN(e.width) ? Number.MAX_VALUE : Math.abs(e.width),
            r = isNaN(e.height) ? Number.MAX_VALUE : Math.abs(e.height);
        return Math.min(i, n, r)
    }

    function Fc(t, e, i) {
        var n = t.getData(), r = [], a = n.getLayout("valueAxisHorizontal") ? 1 : 0;
        r[1 - a] = n.getLayout("valueAxisStart");
        var o = n.getLayout("largeDataIndices"), s = n.getLayout("barWidth"), l = t.getModel("backgroundStyle"),
            u = t.get("showBackground", !0);
        if (u) {
            var h = n.getLayout("largeBackgroundPoints"), c = [];
            c[1 - a] = n.getLayout("backgroundStart");
            var d = new xS({
                shape: {points: h},
                incremental: !!i,
                __startPoint: c,
                __baseDimIdx: a,
                __largeDataIndices: o,
                __barWidth: s,
                silent: !0,
                z2: 0
            });
            Hc(d, l, n), e.add(d)
        }
        var f = new xS({
            shape: {points: n.getLayout("largePoints")},
            incremental: !!i,
            __startPoint: r,
            __baseDimIdx: a,
            __largeDataIndices: o,
            __barWidth: s
        });
        e.add(f), Gc(f, t, n), f.seriesIndex = t.seriesIndex, t.get("silent") || (f.on("mousedown", _S), f.on("mousemove", _S))
    }

    function Vc(t, e, i) {
        var n = t.__baseDimIdx, r = 1 - n, a = t.shape.points, o = t.__largeDataIndices, s = Math.abs(t.__barWidth / 2),
            l = t.__startPoint[r];
        fS[0] = e, fS[1] = i;
        for (var u = fS[n], h = fS[1 - n], c = u - s, d = u + s, f = 0, p = a.length / 2; p > f; f++) {
            var g = 2 * f, m = a[g + n], v = a[g + r];
            if (m >= c && d >= m && (v >= l ? h >= l && v >= h : h >= v && l >= h)) return o[f]
        }
        return -1
    }

    function Gc(t, e, i) {
        var n = i.getVisual("borderColor") || i.getVisual("color"),
            r = e.getModel("itemStyle").getItemStyle(["color", "borderColor"]);
        t.useStyle(r), t.style.fill = null, t.style.stroke = n, t.style.lineWidth = i.getLayout("barWidth")
    }

    function Hc(t, e, i) {
        var n = e.get("borderColor") || e.get("color"), r = e.getItemStyle(["color", "borderColor"]);
        t.useStyle(r), t.style.fill = null, t.style.stroke = n, t.style.lineWidth = i.getLayout("barWidth")
    }

    function Wc(t, e, i) {
        var n, r = "polar" === i.type;
        return n = r ? i.getArea() : i.grid.getRect(), r ? {
            cx: n.cx,
            cy: n.cy,
            r0: t ? n.r0 : e.r0,
            r: t ? n.r : e.r,
            startAngle: t ? e.startAngle : 0,
            endAngle: t ? e.endAngle : 2 * Math.PI
        } : {x: t ? e.x : n.x, y: t ? n.y : e.y, width: t ? e.width : n.width, height: t ? n.height : e.height}
    }

    function Xc(t, e, i) {
        var n = "polar" === t.type ? My : Ly;
        return new n({shape: Wc(e, i, t), silent: !0, z2: 0})
    }

    function Uc(t, e, i, n) {
        var r, a, o = Do(i - t.rotation), s = n[0] > n[1], l = "start" === e && !s || "start" !== e && s;
        return Ao(o - wS / 2) ? (a = l ? "bottom" : "top", r = "center") : Ao(o - 1.5 * wS) ? (a = l ? "top" : "bottom", r = "center") : (a = "middle", r = 1.5 * wS > o && o > wS / 2 ? l ? "left" : "right" : l ? "right" : "left"), {
            rotation: o,
            textAlign: r,
            textVerticalAlign: a
        }
    }

    function Yc(t, e, i) {
        if (!Xh(t.axis)) {
            var n = t.get("axisLabel.showMinLabel"), r = t.get("axisLabel.showMaxLabel");
            e = e || [], i = i || [];
            var a = e[0], o = e[1], s = e[e.length - 1], l = e[e.length - 2], u = i[0], h = i[1], c = i[i.length - 1],
                d = i[i.length - 2];
            n === !1 ? (qc(a), qc(u)) : jc(a, o) && (n ? (qc(o), qc(h)) : (qc(a), qc(u))), r === !1 ? (qc(s), qc(c)) : jc(l, s) && (r ? (qc(l), qc(d)) : (qc(s), qc(c)))
        }
    }

    function qc(t) {
        t && (t.ignore = !0)
    }

    function jc(t, e) {
        var i = t && t.getBoundingRect().clone(), n = e && e.getBoundingRect().clone();
        if (i && n) {
            var r = Oe([]);
            return Ne(r, r, -t.rotation), i.applyTransform(Be([], r, t.getLocalTransform())), n.applyTransform(Be([], r, e.getLocalTransform())), i.intersect(n)
        }
    }

    function Zc(t) {
        return "middle" === t || "center" === t
    }

    function Kc(t, e, i, n, r) {
        for (var a = [], o = [], s = [], l = 0; l < t.length; l++) {
            var u = t[l].coord;
            o[0] = u, o[1] = 0, s[0] = u, s[1] = i, e && (ae(o, o, e), ae(s, s, e));
            var h = new zy({
                anid: r + "_" + t[l].tickValue,
                subPixelOptimize: !0,
                shape: {x1: o[0], y1: o[1], x2: s[0], y2: s[1]},
                style: n,
                z2: 2,
                silent: !0
            });
            a.push(h)
        }
        return a
    }

    function $c(t, e, i) {
        var n = e.axis, r = e.getModel("axisTick");
        if (r.get("show") && !n.scale.isBlank()) {
            for (var a = r.getModel("lineStyle"), o = i.tickDirection * r.get("length"), l = n.getTicksCoords(), u = Kc(l, t._transform, o, s(a.getLineStyle(), {stroke: e.get("axisLine.lineStyle.color")}), "ticks"), h = 0; h < u.length; h++) t.group.add(u[h]);
            return u
        }
    }

    function Qc(t, e, i) {
        var n = e.axis, r = e.getModel("minorTick");
        if (r.get("show") && !n.scale.isBlank()) {
            var a = n.getMinorTicksCoords();
            if (a.length) for (var o = r.getModel("lineStyle"), l = i.tickDirection * r.get("length"), u = s(o.getLineStyle(), s(e.getModel("axisTick").getLineStyle(), {stroke: e.get("axisLine.lineStyle.color")})), h = 0; h < a.length; h++) for (var c = Kc(a[h], t._transform, l, u, "minorticks_" + h), d = 0; d < c.length; d++) t.group.add(c[d])
        }
    }

    function Jc(t, e, i) {
        var n = e.axis, r = D(i.axisLabelShow, e.get("axisLabel.show"));
        if (r && !n.scale.isBlank()) {
            var a = e.getModel("axisLabel"), o = a.get("margin"), s = n.getViewLabels(),
                l = (D(i.labelRotate, a.get("rotate")) || 0) * wS / 180, u = IS(i.rotation, l, i.labelDirection),
                h = e.getCategories && e.getCategories(!0), c = [], d = CS(e), p = e.get("triggerEvent");
            return f(s, function (r, s) {
                var l = r.tickValue, f = r.formattedLabel, g = r.rawLabel, m = a;
                h && h[l] && h[l].textStyle && (m = new fo(h[l].textStyle, a, e.ecModel));
                var v = m.getTextColor() || e.get("axisLine.lineStyle.color"), y = n.dataToCoord(l),
                    x = [y, i.labelOffset + i.labelDirection * o],
                    _ = new _y({anid: "label_" + l, position: x, rotation: u.rotation, silent: d, z2: 10});
                Wa(_.style, m, {
                    text: f,
                    textAlign: m.getShallow("align", !0) || u.textAlign,
                    textVerticalAlign: m.getShallow("verticalAlign", !0) || m.getShallow("baseline", !0) || u.textVerticalAlign,
                    textFill: "function" == typeof v ? v("category" === n.type ? g : "value" === n.type ? l + "" : l, s) : v
                }), p && (_.eventData = MS(e), _.eventData.targetType = "axisLabel", _.eventData.value = g), t._dumbGroup.add(_), _.updateTransform(), c.push(_), t.group.add(_), _.decomposeTransform()
            }), c
        }
    }

    function td(t, e) {
        var i = {axesInfo: {}, seriesInvolved: !1, coordSysAxesInfo: {}, coordSysMap: {}};
        return ed(i, t, e), i.seriesInvolved && nd(i, t), i
    }

    function ed(t, e, i) {
        var n = e.getComponent("tooltip"), r = e.getComponent("axisPointer"), a = r.get("link", !0) || [], o = [];
        TS(i.getCoordinateSystems(), function (i) {
            function s(n, s, l) {
                var h = l.model.getModel("axisPointer", r), d = h.get("show");
                if (d && ("auto" !== d || n || ud(h))) {
                    null == s && (s = h.get("triggerTooltip")), h = n ? id(l, c, r, e, n, s) : h;
                    var f = h.get("snap"), p = hd(l.model), g = s || f || "category" === l.type, m = t.axesInfo[p] = {
                        key: p,
                        axis: l,
                        coordSys: i,
                        axisPointerModel: h,
                        triggerTooltip: s,
                        involveSeries: g,
                        snap: f,
                        useHandle: ud(h),
                        seriesModels: []
                    };
                    u[p] = m, t.seriesInvolved |= g;
                    var v = rd(a, l);
                    if (null != v) {
                        var y = o[v] || (o[v] = {axesInfo: {}});
                        y.axesInfo[p] = m, y.mapper = a[v].mapper, m.linkGroup = y
                    }
                }
            }

            if (i.axisPointerEnabled) {
                var l = hd(i.model), u = t.coordSysAxesInfo[l] = {};
                t.coordSysMap[l] = i;
                var h = i.model, c = h.getModel("tooltip", n);
                if (TS(i.getAxes(), DS(s, !1, null)), i.getTooltipAxes && n && c.get("show")) {
                    var d = "axis" === c.get("trigger"), f = "cross" === c.get("axisPointer.type"),
                        p = i.getTooltipAxes(c.get("axisPointer.axis"));
                    (d || f) && TS(p.baseAxes, DS(s, f ? "cross" : !0, d)), f && TS(p.otherAxes, DS(s, "cross", !1))
                }
            }
        })
    }

    function id(t, e, i, r, a, o) {
        var l = e.getModel("axisPointer"), u = {};
        TS(["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], function (t) {
            u[t] = n(l.get(t))
        }), u.snap = "category" !== t.type && !!o, "cross" === l.get("type") && (u.type = "line");
        var h = u.label || (u.label = {});
        if (null == h.show && (h.show = !1), "cross" === a) {
            var c = l.get("label.show");
            if (h.show = null != c ? c : !0, !o) {
                var d = u.lineStyle = l.get("crossStyle");
                d && s(h, d.textStyle)
            }
        }
        return t.model.getModel("axisPointer", new fo(u, i, r))
    }

    function nd(t, e) {
        e.eachSeries(function (e) {
            var i = e.coordinateSystem, n = e.get("tooltip.trigger", !0), r = e.get("tooltip.show", !0);
            i && "none" !== n && n !== !1 && "item" !== n && r !== !1 && e.get("axisPointer.show", !0) !== !1 && TS(t.coordSysAxesInfo[hd(i.model)], function (t) {
                var n = t.axis;
                i.getAxis(n.dim) === n && (t.seriesModels.push(e), null == t.seriesDataCount && (t.seriesDataCount = 0), t.seriesDataCount += e.getData().count())
            })
        }, this)
    }

    function rd(t, e) {
        for (var i = e.model, n = e.dim, r = 0; r < t.length; r++) {
            var a = t[r] || {};
            if (ad(a[n + "AxisId"], i.id) || ad(a[n + "AxisIndex"], i.componentIndex) || ad(a[n + "AxisName"], i.name)) return r
        }
    }

    function ad(t, e) {
        return "all" === t || _(t) && u(t, e) >= 0 || t === e
    }

    function od(t) {
        var e = sd(t);
        if (e) {
            var i = e.axisPointerModel, n = e.axis.scale, r = i.option, a = i.get("status"), o = i.get("value");
            null != o && (o = n.parse(o));
            var s = ud(i);
            null == a && (r.status = s ? "show" : "hide");
            var l = n.getExtent().slice();
            l[0] > l[1] && l.reverse(), (null == o || o > l[1]) && (o = l[1]), o < l[0] && (o = l[0]), r.value = o, s && (r.status = e.axis.scale.isBlank() ? "hide" : "show")
        }
    }

    function sd(t) {
        var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo;
        return e && e.axesInfo[hd(t)]
    }

    function ld(t) {
        var e = sd(t);
        return e && e.axisPointerModel
    }

    function ud(t) {
        return !!t.get("handle.show")
    }

    function hd(t) {
        return t.type + "||" + t.id
    }

    function cd(t, e, i, n, r, a) {
        var o = AS.getAxisPointerClass(t.axisPointerClass);
        if (o) {
            var s = ld(e);
            s ? (t._axisPointer || (t._axisPointer = new o)).render(e, s, n, a) : dd(t, n)
        }
    }

    function dd(t, e, i) {
        var n = t._axisPointer;
        n && n.dispose(e, i), t._axisPointer = null
    }

    function fd(t, e, i) {
        i = i || {};
        var n = t.coordinateSystem, r = e.axis, a = {}, o = r.getAxesOnZeroOf()[0], s = r.position,
            l = o ? "onZero" : s, u = r.dim, h = n.getRect(), c = [h.x, h.x + h.width, h.y, h.y + h.height],
            d = {left: 0, right: 1, top: 0, bottom: 1, onZero: 2}, f = e.get("offset") || 0,
            p = "x" === u ? [c[2] - f, c[3] + f] : [c[0] - f, c[1] + f];
        if (o) {
            var g = o.toGlobalCoord(o.dataToCoord(0));
            p[d.onZero] = Math.max(Math.min(g, p[1]), p[0])
        }
        a.position = ["y" === u ? p[d[l]] : c[0], "x" === u ? p[d[l]] : c[3]], a.rotation = Math.PI / 2 * ("x" === u ? 0 : 1);
        var m = {top: -1, bottom: 1, left: -1, right: 1};
        a.labelDirection = a.tickDirection = a.nameDirection = m[s], a.labelOffset = o ? p[d[s]] - p[d.onZero] : 0, e.get("axisTick.inside") && (a.tickDirection = -a.tickDirection), D(i.labelInside, e.get("axisLabel.inside")) && (a.labelDirection = -a.labelDirection);
        var v = e.get("axisLabel.rotate");
        return a.labelRotate = "top" === l ? -v : v, a.z2 = 1, a
    }

    function pd(t, e, i, n) {
        var r = i.axis;
        if (!r.scale.isBlank()) {
            var a = i.getModel("splitArea"), o = a.getModel("areaStyle"), l = o.get("color"),
                u = n.coordinateSystem.getRect(), h = r.getTicksCoords({tickModel: a, clamp: !0});
            if (h.length) {
                var c = l.length, d = t.__splitAreaColors, f = R(), p = 0;
                if (d) for (var g = 0; g < h.length; g++) {
                    var m = d.get(h[g].tickValue);
                    if (null != m) {
                        p = (m + (c - 1) * g) % c;
                        break
                    }
                }
                var v = r.toGlobalCoord(h[0].coord), y = o.getAreaStyle();
                l = _(l) ? l : [l];
                for (var g = 1; g < h.length; g++) {
                    var x, w, b, S, M = r.toGlobalCoord(h[g].coord);
                    r.isHorizontal() ? (x = v, w = u.y, b = M - x, S = u.height, v = x + b) : (x = u.x, w = v, b = u.width, S = M - w, v = w + S);
                    var I = h[g - 1].tickValue;
                    null != I && f.set(I, p), e.add(new Ly({
                        anid: null != I ? "area_" + I : null,
                        shape: {x: x, y: w, width: b, height: S},
                        style: s({fill: l[p]}, y),
                        silent: !0
                    })), p = (p + 1) % c
                }
                t.__splitAreaColors = f
            }
        }
    }

    function gd(t) {
        t.__splitAreaColors = null
    }

    function md(t, e, i) {
        am.call(this), this.updateData(t, e, i)
    }

    function vd(t) {
        return [t[0] / 2, t[1] / 2]
    }

    function yd(t, e) {
        this.parent.drift(t, e)
    }

    function xd(t, e) {
        if (!this.incremental && !this.useHoverLayer) if ("emphasis" === e) {
            var i = this.__symbolOriginalScale, n = i[1] / i[0],
                r = {scale: [Math.max(1.1 * i[0], i[0] + 3), Math.max(1.1 * i[1], i[1] + 3 * n)]};
            this.animateTo(r, 400, "elasticOut")
        } else "normal" === e && this.animateTo({scale: this.__symbolOriginalScale}, 400, "elasticOut")
    }

    function _d(t) {
        this.group = new am, this._symbolCtor = t || md
    }

    function wd(t, e, i, n) {
        return !(!e || isNaN(e[0]) || isNaN(e[1]) || n.isIgnore && n.isIgnore(i) || n.clipShape && !n.clipShape.contain(e[0], e[1]) || "none" === t.getItemVisual(i, "symbol"))
    }

    function bd(t) {
        return null == t || S(t) || (t = {isIgnore: t}), t || {}
    }

    function Sd(t) {
        var e = t.hostModel;
        return {
            itemStyle: e.getModel("itemStyle").getItemStyle(["color"]),
            hoverItemStyle: e.getModel("emphasis.itemStyle").getItemStyle(),
            symbolRotate: e.get("symbolRotate"),
            symbolOffset: e.get("symbolOffset"),
            hoverAnimation: e.get("hoverAnimation"),
            labelModel: e.getModel("label"),
            hoverLabelModel: e.getModel("emphasis.label"),
            cursorStyle: e.get("cursor")
        }
    }

    function Md(t, e, i) {
        var n, r = t.getBaseAxis(), a = t.getOtherAxis(r), o = Id(a, i), s = r.dim, l = a.dim, u = e.mapDimension(l),
            h = e.mapDimension(s), c = "x" === l || "radius" === l ? 1 : 0, d = p(t.dimensions, function (t) {
                return e.mapDimension(t)
            }), f = e.getCalculationInfo("stackResultDimension");
        return (n |= uh(e, d[0])) && (d[0] = f), (n |= uh(e, d[1])) && (d[1] = f), {
            dataDimsForPoint: d,
            valueStart: o,
            valueAxisDim: l,
            baseAxisDim: s,
            stacked: !!n,
            valueDim: u,
            baseDim: h,
            baseDataOffset: c,
            stackedOverDimension: e.getCalculationInfo("stackedOverDimension")
        }
    }

    function Id(t, e) {
        var i = 0, n = t.scale.getExtent();
        return "start" === e ? i = n[0] : "end" === e ? i = n[1] : n[0] > 0 ? i = n[0] : n[1] < 0 && (i = n[1]), i
    }

    function Cd(t, e, i, n) {
        var r = 0 / 0;
        t.stacked && (r = i.get(i.getCalculationInfo("stackedOverDimension"), n)), isNaN(r) && (r = t.valueStart);
        var a = t.baseDataOffset, o = [];
        return o[a] = i.get(t.baseDim, n), o[1 - a] = r, e.dataToPoint(o)
    }

    function Td(t, e) {
        var i = [];
        return e.diff(t).add(function (t) {
            i.push({cmd: "+", idx: t})
        }).update(function (t, e) {
            i.push({cmd: "=", idx: e, idx1: t})
        }).remove(function (t) {
            i.push({cmd: "-", idx: t})
        }).execute(), i
    }

    function Dd(t) {
        return isNaN(t[0]) || isNaN(t[1])
    }

    function Ad(t, e, i, n, r, a, o, s, l, u) {
        return "none" !== u && u ? kd.apply(this, arguments) : Pd.apply(this, arguments)
    }

    function kd(t, e, i, n, r, a, o, s, l, u, h) {
        for (var c = 0, d = i, f = 0; n > f; f++) {
            var p = e[d];
            if (d >= r || 0 > d) break;
            if (Dd(p)) {
                if (h) {
                    d += a;
                    continue
                }
                break
            }
            if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]); else if (l > 0) {
                var g = e[c], m = "y" === u ? 1 : 0, v = (p[m] - g[m]) * l;
                US(qS, g), qS[m] = g[m] + v, US(jS, p), jS[m] = p[m] - v, t.bezierCurveTo(qS[0], qS[1], jS[0], jS[1], p[0], p[1])
            } else t.lineTo(p[0], p[1]);
            c = d, d += a
        }
        return f
    }

    function Pd(t, e, i, n, r, a, o, s, l, u, h) {
        for (var c = 0, d = i, f = 0; n > f; f++) {
            var p = e[d];
            if (d >= r || 0 > d) break;
            if (Dd(p)) {
                if (h) {
                    d += a;
                    continue
                }
                break
            }
            if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]), US(qS, p); else if (l > 0) {
                var g = d + a, m = e[g];
                if (h) for (; m && Dd(e[g]);) g += a, m = e[g];
                var v = .5, y = e[c], m = e[g];
                if (!m || Dd(m)) US(jS, p); else {
                    Dd(m) && !h && (m = p), q(YS, m, y);
                    var x, _;
                    if ("x" === u || "y" === u) {
                        var w = "x" === u ? 0 : 1;
                        x = Math.abs(p[w] - y[w]), _ = Math.abs(p[w] - m[w])
                    } else x = ug(p, y), _ = ug(p, m);
                    v = _ / (_ + x), XS(jS, p, YS, -l * (1 - v))
                }
                HS(qS, qS, s), WS(qS, qS, o), HS(jS, jS, s), WS(jS, jS, o), t.bezierCurveTo(qS[0], qS[1], jS[0], jS[1], p[0], p[1]), XS(qS, p, YS, l * v)
            } else t.lineTo(p[0], p[1]);
            c = d, d += a
        }
        return f
    }

    function Ld(t, e) {
        var i = [1 / 0, 1 / 0], n = [-1 / 0, -1 / 0];
        if (e) for (var r = 0; r < t.length; r++) {
            var a = t[r];
            a[0] < i[0] && (i[0] = a[0]), a[1] < i[1] && (i[1] = a[1]), a[0] > n[0] && (n[0] = a[0]), a[1] > n[1] && (n[1] = a[1])
        }
        return {min: e ? i : n, max: e ? n : i}
    }

    function Od(t, e) {
        if (t.length === e.length) {
            for (var i = 0; i < t.length; i++) {
                var n = t[i], r = e[i];
                if (n[0] !== r[0] || n[1] !== r[1]) return
            }
            return !0
        }
    }

    function zd(t, e) {
        var i = [], n = [], r = [], a = [];
        return Br(t, i, n), Br(e, r, a), Math.max(Math.abs(i[0] - r[0]), Math.abs(i[1] - r[1]), Math.abs(n[0] - a[0]), Math.abs(n[1] - a[1]))
    }

    function Bd(t) {
        return "number" == typeof t ? t : t ? .5 : 0
    }

    function Ed(t, e, i) {
        if (!i.valueDim) return [];
        for (var n = [], r = 0, a = e.count(); a > r; r++) n.push(Cd(i, t, e, r));
        return n
    }

    function Nd(t, e, i) {
        for (var n = e.getBaseAxis(), r = "x" === n.dim || "radius" === n.dim ? 0 : 1, a = [], o = 0; o < t.length - 1; o++) {
            var s = t[o + 1], l = t[o];
            a.push(l);
            var u = [];
            switch (i) {
                case"end":
                    u[r] = s[r], u[1 - r] = l[1 - r], a.push(u);
                    break;
                case"middle":
                    var h = (l[r] + s[r]) / 2, c = [];
                    u[r] = c[r] = h, u[1 - r] = l[1 - r], c[1 - r] = s[1 - r], a.push(u), a.push(c);
                    break;
                default:
                    u[r] = l[r], u[1 - r] = s[1 - r], a.push(u)
            }
        }
        return t[o] && a.push(t[o]), a
    }

    function Rd(t, e) {
        var i = t.getVisual("visualMeta");
        if (i && i.length && t.count() && "cartesian2d" === e.type) {
            for (var n, r, a = i.length - 1; a >= 0; a--) {
                var o = i[a].dimension, s = t.dimensions[o], l = t.getDimensionInfo(s);
                if (n = l && l.coordDim, "x" === n || "y" === n) {
                    r = i[a];
                    break
                }
            }
            if (r) {
                var u = e.getAxis(n), h = p(r.stops, function (t) {
                    return {coord: u.toGlobalCoord(u.dataToCoord(t.value)), color: t.color}
                }), c = h.length, d = r.outerColors.slice();
                c && h[0].coord > h[c - 1].coord && (h.reverse(), d.reverse());
                var g = 10, m = h[0].coord - g, v = h[c - 1].coord + g, y = v - m;
                if (.001 > y) return "transparent";
                f(h, function (t) {
                    t.offset = (t.coord - m) / y
                }), h.push({
                    offset: c ? h[c - 1].offset : .5,
                    color: d[1] || "transparent"
                }), h.unshift({offset: c ? h[0].offset : .5, color: d[0] || "transparent"});
                var x = new Vy(0, 0, 0, 0, h, !0);
                return x[n] = m, x[n + "2"] = v, x
            }
        }
    }

    function Fd(t, e, i) {
        var n = t.get("showAllSymbol"), r = "auto" === n;
        if (!n || r) {
            var a = i.getAxesByScale("ordinal")[0];
            if (a && (!r || !Vd(a, e))) {
                var o = e.mapDimension(a.dim), s = {};
                return f(a.getViewLabels(), function (t) {
                    s[t.tickValue] = 1
                }), function (t) {
                    return !s.hasOwnProperty(e.get(o, t))
                }
            }
        }
    }

    function Vd(t, e) {
        var i = t.getExtent(), n = Math.abs(i[1] - i[0]) / t.scale.count();
        isNaN(n) && (n = 0);
        for (var r = e.count(), a = Math.max(1, Math.round(r / 5)), o = 0; r > o; o += a) if (1.5 * md.getSymbolSize(e, o)[t.isHorizontal() ? 1 : 0] > n) return !1;
        return !0
    }

    function Gd(t, e, i) {
        if ("cartesian2d" === t.type) {
            var n = t.getBaseAxis().isHorizontal(), r = kc(t, e, i);
            if (!i.get("clip", !0)) {
                var a = r.shape, o = Math.max(a.width, a.height);
                n ? (a.y -= o, a.height += 2 * o) : (a.x -= o, a.width += 2 * o)
            }
            return r
        }
        return Pc(t, e, i)
    }

    function Hd(t, e) {
        this.getAllNames = function () {
            var t = e();
            return t.mapArray(t.getName)
        }, this.containName = function (t) {
            var i = e();
            return i.indexOfName(t) >= 0
        }, this.indexOfName = function (e) {
            var i = t();
            return i.indexOfName(e)
        }, this.getItemVisual = function (e, i) {
            var n = t();
            return n.getItemVisual(e, i)
        }
    }

    function Wd(t, e, i, n) {
        var r = e.getData(), a = this.dataIndex, o = r.getName(a), s = e.get("selectedOffset");
        n.dispatchAction({type: "pieToggleSelect", from: t, name: o, seriesId: e.id}), r.each(function (t) {
            Xd(r.getItemGraphicEl(t), r.getItemLayout(t), e.isSelected(r.getName(t)), s, i)
        })
    }

    function Xd(t, e, i, n, r) {
        var a = (e.startAngle + e.endAngle) / 2, o = Math.cos(a), s = Math.sin(a), l = i ? n : 0, u = [o * l, s * l];
        r ? t.animate().when(200, {position: u}).start("bounceOut") : t.attr("position", u)
    }

    function Ud(t, e) {
        am.call(this);
        var i = new My({z2: 2}), n = new Ay, r = new _y;
        this.add(i), this.add(n), this.add(r), this.updateData(t, e, !0)
    }

    function Yd(t, e, i, n, r, a, o, s, l, u) {
        function h(e, i, n) {
            for (var r = e; i > r && !(t[r].y + n > l + o); r++) if (t[r].y += n, r > e && i > r + 1 && t[r + 1].y > t[r].y + t[r].height) return void c(r, n / 2);
            c(i - 1, n / 2)
        }

        function c(e, i) {
            for (var n = e; n >= 0 && !(t[n].y - i < l) && (t[n].y -= i, !(n > 0 && t[n].y > t[n - 1].y + t[n - 1].height)); n--) ;
        }

        function d(t, e, i, n, r, a) {
            for (var o = a > 0 ? e ? Number.MAX_VALUE : 0 : e ? Number.MAX_VALUE : 0, s = 0, l = t.length; l > s; s++) if ("none" === t[s].labelAlignTo) {
                var u = Math.abs(t[s].y - n), h = t[s].len, c = t[s].len2,
                    d = r + h > u ? Math.sqrt((r + h + c) * (r + h + c) - u * u) : Math.abs(t[s].x - i);
                e && d >= o && (d = o - 10), !e && o >= d && (d = o + 10), t[s].x = i + d * a, o = d
            }
        }

        t.sort(function (t, e) {
            return t.y - e.y
        });
        for (var f, p = 0, g = t.length, m = [], v = [], y = 0; g > y; y++) {
            if ("outer" === t[y].position && "labelLine" === t[y].labelAlignTo) {
                var x = t[y].x - u;
                t[y].linePoints[1][0] += x, t[y].x = u
            }
            f = t[y].y - p, 0 > f && h(y, g, -f, r), p = t[y].y + t[y].height
        }
        0 > o - p && c(g - 1, p - o);
        for (var y = 0; g > y; y++) t[y].y >= i ? v.push(t[y]) : m.push(t[y]);
        d(m, !1, e, i, n, r), d(v, !0, e, i, n, r)
    }

    function qd(t, e, i, n, r, a, o, s) {
        for (var l = [], u = [], h = Number.MAX_VALUE, c = -Number.MAX_VALUE, d = 0; d < t.length; d++) jd(t[d]) || (t[d].x < e ? (h = Math.min(h, t[d].x), l.push(t[d])) : (c = Math.max(c, t[d].x), u.push(t[d])));
        Yd(u, e, i, n, 1, r, a, o, s, c), Yd(l, e, i, n, -1, r, a, o, s, h);
        for (var d = 0; d < t.length; d++) {
            var f = t[d];
            if (!jd(f)) {
                var p = f.linePoints;
                if (p) {
                    var g, m = "edge" === f.labelAlignTo, v = f.textRect.width;
                    g = m ? f.x < e ? p[2][0] - f.labelDistance - o - f.labelMargin : o + r - f.labelMargin - p[2][0] - f.labelDistance : f.x < e ? f.x - o - f.bleedMargin : o + r - f.x - f.bleedMargin, g < f.textRect.width && (f.text = Ki(f.text, g, f.font), "edge" === f.labelAlignTo && (v = Wi(f.text, f.font)));
                    var y = p[1][0] - p[2][0];
                    m ? p[2][0] = f.x < e ? o + f.labelMargin + v + f.labelDistance : o + r - f.labelMargin - v - f.labelDistance : (p[2][0] = f.x < e ? f.x + f.labelDistance : f.x - f.labelDistance, p[1][0] = p[2][0] + y), p[1][1] = p[2][1] = f.y
                }
            }
        }
    }

    function jd(t) {
        return "center" === t.position
    }

    function Zd(t, e) {
        return Ko(t.getBoxLayoutParams(), {width: e.getWidth(), height: e.getHeight()})
    }

    function Kd() {
        this.group = new am
    }

    function $d(t, e) {
        var i = t.get("center"), n = e.getWidth(), r = e.getHeight(), a = Math.min(n, r), o = wo(i[0], e.getWidth()),
            s = wo(i[1], e.getHeight()), l = wo(t.get("radius"), a / 2);
        return {cx: o, cy: s, r: l}
    }

    function Qd(t, e) {
        return e && ("string" == typeof e ? t = e.replace("{value}", null != t ? t : "") : "function" == typeof e && (t = e(t))), t
    }

    function Jd(t, e, i) {
        var n, r = {}, a = "toggleSelected" === t;
        return i.eachComponent("legend", function (i) {
            a && null != n ? i[n ? "select" : "unSelect"](e.name) : "allSelect" === t || "inverseSelect" === t ? i[t]() : (i[t](e.name), n = i.isSelected(e.name));
            var o = i.getData();
            f(o, function (t) {
                var e = t.get("name");
                if ("\n" !== e && "" !== e) {
                    var n = i.isSelected(e);
                    r[e] = r.hasOwnProperty(e) ? r[e] && n : n
                }
            })
        }), "allSelect" === t || "inverseSelect" === t ? {selected: r} : {name: e.name, selected: r}
    }

    function tf(t, e) {
        var i = gx(e.get("padding")), n = e.getItemStyle(["color", "opacity"]);
        n.fill = e.get("backgroundColor");
        var t = new Ly({
            shape: {
                x: t.x - i[3],
                y: t.y - i[0],
                width: t.width + i[1] + i[3],
                height: t.height + i[0] + i[2],
                r: e.get("borderRadius")
            }, style: n, silent: !0, z2: -1
        });
        return t
    }

    function ef(t, e, i, n, r, a) {
        var o;
        return "line" !== e && e.indexOf("empty") < 0 ? (o = i.getItemStyle(), t.style.stroke = n, a || (o.stroke = r)) : o = i.getItemStyle(["borderWidth", "borderColor"]), t.setStyle(o)
    }

    function nf(t, e, i, n) {
        af(t, e, i, n), i.dispatchAction({type: "legendToggleSelect", name: null != t ? t : e}), rf(t, e, i, n)
    }

    function rf(t, e, i, n) {
        var r = i.getZr().storage.getDisplayList()[0];
        r && r.useHoverLayer || i.dispatchAction({type: "highlight", seriesName: t, name: e, excludeSeriesId: n})
    }

    function af(t, e, i, n) {
        var r = i.getZr().storage.getDisplayList()[0];
        r && r.useHoverLayer || i.dispatchAction({type: "downplay", seriesName: t, name: e, excludeSeriesId: n})
    }

    function of(t, e, i) {
        var n = t.getOrient(), r = [1, 1];
        r[n.index] = 0, $o(e, i, {type: "box", ignoreSize: r})
    }

    function sf(t, e, i, n, r) {
        var a = t.axis;
        if (!a.scale.isBlank() && a.containData(e)) {
            if (!t.involveSeries) return void i.showPointer(t, e);
            var s = lf(e, t), l = s.payloadBatch, u = s.snapToValue;
            l[0] && null == r.seriesIndex && o(r, l[0]), !n && t.snap && a.containData(u) && null != u && (e = u), i.showPointer(t, e, l, r), i.showTooltip(t, s, u)
        }
    }

    function lf(t, e) {
        var i = e.axis, n = i.dim, r = t, a = [], o = Number.MAX_VALUE, s = -1;
        return OM(e.seriesModels, function (e) {
            var l, u, h = e.getData().mapDimension(n, !0);
            if (e.getAxisTooltipData) {
                var c = e.getAxisTooltipData(h, t, i);
                u = c.dataIndices, l = c.nestestValue
            } else {
                if (u = e.getData().indicesOfNearest(h[0], t, "category" === i.type ? .5 : null), !u.length) return;
                l = e.getData().get(h[0], u[0])
            }
            if (null != l && isFinite(l)) {
                var d = t - l, f = Math.abs(d);
                o >= f && ((o > f || d >= 0 && 0 > s) && (o = f, s = d, r = l, a.length = 0), OM(u, function (t) {
                    a.push({seriesIndex: e.seriesIndex, dataIndexInside: t, dataIndex: e.getData().getRawIndex(t)})
                }))
            }
        }), {payloadBatch: a, snapToValue: r}
    }

    function uf(t, e, i, n) {
        t[e.key] = {value: i, payloadBatch: n}
    }

    function hf(t, e, i, n) {
        var r = i.payloadBatch, a = e.axis, o = a.model, s = e.axisPointerModel;
        if (e.triggerTooltip && r.length) {
            var l = e.coordSys.model, u = hd(l), h = t.map[u];
            h || (h = t.map[u] = {
                coordSysId: l.id,
                coordSysIndex: l.componentIndex,
                coordSysType: l.type,
                coordSysMainType: l.mainType,
                dataByAxis: []
            }, t.list.push(h)), h.dataByAxis.push({
                axisDim: a.dim,
                axisIndex: o.componentIndex,
                axisType: o.type,
                axisId: o.id,
                value: n,
                valueLabelOpt: {precision: s.get("label.precision"), formatter: s.get("label.formatter")},
                seriesDataIndices: r.slice()
            })
        }
    }

    function cf(t, e, i) {
        var n = i.axesInfo = [];
        OM(e, function (e, i) {
            var r = e.axisPointerModel.option, a = t[i];
            a ? (!e.useHandle && (r.status = "show"), r.value = a.value, r.seriesDataIndices = (a.payloadBatch || []).slice()) : !e.useHandle && (r.status = "hide"), "show" === r.status && n.push({
                axisDim: e.axis.dim,
                axisIndex: e.axis.model.componentIndex,
                value: r.value
            })
        })
    }

    function df(t, e, i, n) {
        if (mf(e) || !t.list.length) return void n({type: "hideTip"});
        var r = ((t.list[0].dataByAxis[0] || {}).seriesDataIndices || [])[0] || {};
        n({
            type: "showTip",
            escapeConnect: !0,
            x: e[0],
            y: e[1],
            tooltipOption: i.tooltipOption,
            position: i.position,
            dataIndexInside: r.dataIndexInside,
            dataIndex: r.dataIndex,
            seriesIndex: r.seriesIndex,
            dataByCoordSys: t.list
        })
    }

    function ff(t, e, i) {
        var n = i.getZr(), r = "axisPointerLastHighlights", a = BM(n)[r] || {}, o = BM(n)[r] = {};
        OM(t, function (t) {
            var e = t.axisPointerModel.option;
            "show" === e.status && OM(e.seriesDataIndices, function (t) {
                var e = t.seriesIndex + " | " + t.dataIndex;
                o[e] = t
            })
        });
        var s = [], l = [];
        f(a, function (t, e) {
            !o[e] && l.push(t)
        }), f(o, function (t, e) {
            !a[e] && s.push(t)
        }), l.length && i.dispatchAction({
            type: "downplay",
            escapeConnect: !0,
            batch: l
        }), s.length && i.dispatchAction({type: "highlight", escapeConnect: !0, batch: s})
    }

    function pf(t, e) {
        for (var i = 0; i < (t || []).length; i++) {
            var n = t[i];
            if (e.axis.dim === n.axisDim && e.axis.model.componentIndex === n.axisIndex) return n
        }
    }

    function gf(t) {
        var e = t.axis.model, i = {}, n = i.axisDim = t.axis.dim;
        return i.axisIndex = i[n + "AxisIndex"] = e.componentIndex, i.axisName = i[n + "AxisName"] = e.name, i.axisId = i[n + "AxisId"] = e.id, i
    }

    function mf(t) {
        return !t || null == t[0] || isNaN(t[0]) || null == t[1] || isNaN(t[1])
    }

    function vf(t, e, i) {
        if (!Up.node) {
            var n = e.getZr();
            NM(n).records || (NM(n).records = {}), yf(n, e);
            var r = NM(n).records[t] || (NM(n).records[t] = {});
            r.handler = i
        }
    }

    function yf(t, e) {
        function i(i, n) {
            t.on(i, function (i) {
                var r = bf(e);
                RM(NM(t).records, function (t) {
                    t && n(t, i, r.dispatchAction)
                }), xf(r.pendings, e)
            })
        }

        NM(t).initialized || (NM(t).initialized = !0, i("click", x(wf, "click")), i("mousemove", x(wf, "mousemove")), i("globalout", _f))
    }

    function xf(t, e) {
        var i, n = t.showTip.length, r = t.hideTip.length;
        n ? i = t.showTip[n - 1] : r && (i = t.hideTip[r - 1]), i && (i.dispatchAction = null, e.dispatchAction(i))
    }

    function _f(t, e, i) {
        t.handler("leave", null, i)
    }

    function wf(t, e, i, n) {
        e.handler(t, i, n)
    }

    function bf(t) {
        var e = {showTip: [], hideTip: []}, i = function (n) {
            var r = e[n.type];
            r ? r.push(n) : (n.dispatchAction = i, t.dispatchAction(n))
        };
        return {dispatchAction: i, pendings: e}
    }

    function Sf(t, e) {
        if (!Up.node) {
            var i = e.getZr(), n = (NM(i).records || {})[t];
            n && (NM(i).records[t] = null)
        }
    }

    function Mf() {
    }

    function If(t, e, i, n) {
        Cf(VM(i).lastProp, n) || (VM(i).lastProp = n, e ? Ja(i, n, t) : (i.stopAnimation(), i.attr(n)))
    }

    function Cf(t, e) {
        if (S(t) && S(e)) {
            var i = !0;
            return f(e, function (e, n) {
                i = i && Cf(t[n], e)
            }), !!i
        }
        return t === e
    }

    function Tf(t, e) {
        t[e.get("label.show") ? "show" : "hide"]()
    }

    function Df(t) {
        return {position: t.position.slice(), rotation: t.rotation || 0}
    }

    function Af(t, e, i) {
        var n = e.get("z"), r = e.get("zlevel");
        t && t.traverse(function (t) {
            "group" !== t.type && (null != n && (t.z = n), null != r && (t.zlevel = r), t.silent = i)
        })
    }

    function kf(t) {
        var e, i = t.get("type"), n = t.getModel(i + "Style");
        return "line" === i ? (e = n.getLineStyle(), e.fill = null) : "shadow" === i && (e = n.getAreaStyle(), e.stroke = null), e
    }

    function Pf(t, e, i, n, r) {
        var a = i.get("value"), o = Of(a, e.axis, e.ecModel, i.get("seriesDataIndices"), {
                precision: i.get("label.precision"),
                formatter: i.get("label.formatter")
            }), s = i.getModel("label"), l = gx(s.get("padding") || 0), u = s.getFont(), h = Xi(o, u), c = r.position,
            d = h.width + l[1] + l[3], f = h.height + l[0] + l[2], p = r.align;
        "right" === p && (c[0] -= d), "center" === p && (c[0] -= d / 2);
        var g = r.verticalAlign;
        "bottom" === g && (c[1] -= f), "middle" === g && (c[1] -= f / 2), Lf(c, d, f, n);
        var m = s.get("backgroundColor");
        m && "auto" !== m || (m = e.get("axisLine.lineStyle.color")), t.label = {
            shape: {
                x: 0,
                y: 0,
                width: d,
                height: f,
                r: s.get("borderRadius")
            },
            position: c.slice(),
            style: {
                text: o,
                textFont: u,
                textFill: s.getTextColor(),
                textPosition: "inside",
                textPadding: l,
                fill: m,
                stroke: s.get("borderColor") || "transparent",
                lineWidth: s.get("borderWidth") || 0,
                shadowBlur: s.get("shadowBlur"),
                shadowColor: s.get("shadowColor"),
                shadowOffsetX: s.get("shadowOffsetX"),
                shadowOffsetY: s.get("shadowOffsetY")
            },
            z2: 10
        }
    }

    function Lf(t, e, i, n) {
        var r = n.getWidth(), a = n.getHeight();
        t[0] = Math.min(t[0] + e, r) - e, t[1] = Math.min(t[1] + i, a) - i, t[0] = Math.max(t[0], 0), t[1] = Math.max(t[1], 0)
    }

    function Of(t, e, i, n, r) {
        t = e.scale.parse(t);
        var a = e.scale.getLabel(t, {precision: r.precision}), o = r.formatter;
        if (o) {
            var s = {value: Vh(e, t), axisDimension: e.dim, axisIndex: e.index, seriesData: []};
            f(n, function (t) {
                var e = i.getSeriesByIndex(t.seriesIndex), n = t.dataIndexInside, r = e && e.getDataParams(n);
                r && s.seriesData.push(r)
            }), b(o) ? a = o.replace("{value}", a) : w(o) && (a = o(s))
        }
        return a
    }

    function zf(t, e, i) {
        var n = Le();
        return Ne(n, n, i.rotation), Ee(n, n, i.position), io([t.dataToCoord(e), (i.labelOffset || 0) + (i.labelDirection || 1) * (i.labelMargin || 0)], n)
    }

    function Bf(t, e, i, n, r, a) {
        var o = bS.innerTextLayout(i.rotation, 0, i.labelDirection);
        i.labelMargin = r.get("label.margin"), Pf(e, n, r, a, {
            position: zf(n.axis, t, i),
            align: o.textAlign,
            verticalAlign: o.textVerticalAlign
        })
    }

    function Ef(t, e, i) {
        return i = i || 0, {x1: t[i], y1: t[1 - i], x2: e[i], y2: e[1 - i]}
    }

    function Nf(t, e, i) {
        return i = i || 0, {x: t[i], y: t[1 - i], width: e[i], height: e[1 - i]}
    }

    function Rf(t, e) {
        var i = {};
        return i[e.dim + "AxisIndex"] = e.index, t.getCartesian(i)
    }

    function Ff(t) {
        return "x" === t.dim ? 0 : 1
    }

    function Vf(t) {
        var e = "cubic-bezier(0.23, 1, 0.32, 1)", i = "left " + t + "s " + e + ",top " + t + "s " + e;
        return p(qM, function (t) {
            return t + "transition:" + i
        }).join(";")
    }

    function Gf(t) {
        var e = [], i = t.get("fontSize"), n = t.getTextColor();
        n && e.push("color:" + n), e.push("font:" + t.getFont());
        var r = t.get("lineHeight");
        null == r && (r = Math.round(3 * i / 2)), i && e.push("line-height:" + r + "px");
        var a = t.get("textShadowColor"), o = t.get("textShadowBlur") || 0, s = t.get("textShadowOffsetX") || 0,
            l = t.get("textShadowOffsetY") || 0;
        return o && e.push("text-shadow:" + s + "px " + l + "px " + o + "px " + a), UM(["decoration", "align"], function (i) {
            var n = t.get(i);
            n && e.push("text-" + i + ":" + n)
        }), e.join(";")
    }

    function Hf(t) {
        var e = [], i = t.get("transitionDuration"), n = t.get("backgroundColor"), r = t.getModel("textStyle"),
            a = t.get("padding");
        return i && e.push(Vf(i)), n && (Up.canvasSupported ? e.push("background-Color:" + n) : (e.push("background-Color:#" + ni(n)), e.push("filter:alpha(opacity=70)"))), UM(["width", "color", "radius"], function (i) {
            var n = "border-" + i, r = YM(n), a = t.get(r);
            null != a && e.push(n + ":" + a + ("color" === i ? "" : "px"))
        }), e.push(Gf(r)), null != a && e.push("padding:" + gx(a).join("px ") + "px"), e.join(";") + ";"
    }

    function Wf(t, e, i, n, r) {
        var a = e && e.painter;
        if (i) {
            var o = a && a.getViewportRoot();
            o && pe(t, o, document.body, n, r)
        } else {
            t[0] = n, t[1] = r;
            var s = a && a.getViewportRootOffset();
            s && (t[0] += s.offsetLeft, t[1] += s.offsetTop)
        }
        t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight()
    }

    function Xf(t, e, i) {
        if (Up.wxa) return null;
        var n = document.createElement("div");
        n.domBelongToZr = !0, this.el = n;
        var r = this._zr = e.getZr(), a = this._appendToBody = i && i.appendToBody;
        this._styleCoord = [0, 0, 0, 0], Wf(this._styleCoord, r, a, e.getWidth() / 2, e.getHeight() / 2), a ? document.body.appendChild(n) : t.appendChild(n), this._container = t, this._show = !1, this._hideTimeout;
        var o = this;
        n.onmouseenter = function () {
            o._enterable && (clearTimeout(o._hideTimeout), o._show = !0), o._inContent = !0
        }, n.onmousemove = function (t) {
            if (t = t || window.event, !o._enterable) {
                var e = r.handler, i = r.painter.getViewportRoot();
                be(i, t, !0), e.dispatch("mousemove", t)
            }
        }, n.onmouseleave = function () {
            o._enterable && o._show && o.hideLater(o._hideDelay), o._inContent = !1
        }
    }

    function Uf(t, e, i, n) {
        t[0] = i, t[1] = n, t[2] = t[0] / e.getWidth(), t[3] = t[1] / e.getHeight()
    }

    function Yf(t) {
        var e = this._zr = t.getZr();
        this._styleCoord = [0, 0, 0, 0], Uf(this._styleCoord, e, t.getWidth() / 2, t.getHeight() / 2), this._show = !1, this._hideTimeout
    }

    function qf(t) {
        for (var e = t.pop(); t.length;) {
            var i = t.pop();
            i && (fo.isInstance(i) && (i = i.get("tooltip", !0)), "string" == typeof i && (i = {formatter: i}), e = new fo(i, e, e.ecModel))
        }
        return e
    }

    function jf(t, e) {
        return t.dispatchAction || y(e.dispatchAction, e)
    }

    function Zf(t, e, i, n, r, a, o) {
        var s = i.getOuterSize(), l = s.width, u = s.height;
        return null != a && (t + l + a > n ? t -= l + a : t += a), null != o && (e + u + o > r ? e -= u + o : e += o), [t, e]
    }

    function Kf(t, e, i, n, r) {
        var a = i.getOuterSize(), o = a.width, s = a.height;
        return t = Math.min(t + o, n) - o, e = Math.min(e + s, r) - s, t = Math.max(t, 0), e = Math.max(e, 0), [t, e]
    }

    function $f(t, e, i) {
        var n = i[0], r = i[1], a = 5, o = 0, s = 0, l = e.width, u = e.height;
        switch (t) {
            case"inside":
                o = e.x + l / 2 - n / 2, s = e.y + u / 2 - r / 2;
                break;
            case"top":
                o = e.x + l / 2 - n / 2, s = e.y - r - a;
                break;
            case"bottom":
                o = e.x + l / 2 - n / 2, s = e.y + u + a;
                break;
            case"left":
                o = e.x - n - a, s = e.y + u / 2 - r / 2;
                break;
            case"right":
                o = e.x + l + a, s = e.y + u / 2 - r / 2
        }
        return [o, s]
    }

    function Qf(t) {
        return "center" === t || "middle" === t
    }

    function Jf(t) {
        tr(t, "label", ["show"])
    }

    function tp(t) {
        return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y)))
    }

    function ep(t) {
        return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y))
    }

    function ip(t, e, i, n, r, a) {
        var o = [], s = uh(e, n), l = s ? e.getCalculationInfo("stackResultDimension") : n, u = lp(e, l, t),
            h = e.indicesOfNearest(l, u)[0];
        o[r] = e.get(i, h), o[a] = e.get(l, h);
        var c = e.get(n, h), d = Mo(e.get(n, h));
        return d = Math.min(d, 20), d >= 0 && (o[a] = +o[a].toFixed(d)), [o, c]
    }

    function np(t, e) {
        var i = t.getData(), r = t.coordinateSystem;
        if (e && !ep(e) && !_(e.coord) && r) {
            var a = r.dimensions, o = rp(e, i, r, t);
            if (e = n(e), e.type && rI[e.type] && o.baseAxis && o.valueAxis) {
                var s = iI(a, o.baseAxis.dim), l = iI(a, o.valueAxis.dim),
                    u = rI[e.type](i, o.baseDataDim, o.valueDataDim, s, l);
                e.coord = u[0], e.value = u[1]
            } else {
                for (var h = [null != e.xAxis ? e.xAxis : e.radiusAxis, null != e.yAxis ? e.yAxis : e.angleAxis], c = 0; 2 > c; c++) rI[h[c]] && (h[c] = lp(i, i.mapDimension(a[c]), h[c]));
                e.coord = h
            }
        }
        return e
    }

    function rp(t, e, i, n) {
        var r = {};
        return null != t.valueIndex || null != t.valueDim ? (r.valueDataDim = null != t.valueIndex ? e.getDimension(t.valueIndex) : t.valueDim, r.valueAxis = i.getAxis(ap(n, r.valueDataDim)), r.baseAxis = i.getOtherAxis(r.valueAxis), r.baseDataDim = e.mapDimension(r.baseAxis.dim)) : (r.baseAxis = n.getBaseAxis(), r.valueAxis = i.getOtherAxis(r.baseAxis), r.baseDataDim = e.mapDimension(r.baseAxis.dim), r.valueDataDim = e.mapDimension(r.valueAxis.dim)), r
    }

    function ap(t, e) {
        var i = t.getData(), n = i.dimensions;
        e = i.getDimension(e);
        for (var r = 0; r < n.length; r++) {
            var a = i.getDimensionInfo(n[r]);
            if (a.name === e) return a.coordDim
        }
    }

    function op(t, e) {
        return t && t.containData && e.coord && !tp(e) ? t.containData(e.coord) : !0
    }

    function sp(t, e, i, n) {
        return 2 > n ? t.coord && t.coord[n] : t.value
    }

    function lp(t, e, i) {
        if ("average" === i) {
            var n = 0, r = 0;
            return t.each(e, function (t) {
                isNaN(t) || (n += t, r++)
            }), n / r
        }
        return "median" === i ? t.getMedian(e) : t.getDataExtent(e, !0)["max" === i ? 1 : 0]
    }

    function up(t, e, i) {
        var n = e.coordinateSystem;
        t.each(function (r) {
            var a, o = t.getItemModel(r), s = wo(o.get("x"), i.getWidth()), l = wo(o.get("y"), i.getHeight());
            if (isNaN(s) || isNaN(l)) {
                if (e.getMarkerPosition) a = e.getMarkerPosition(t.getValues(t.dimensions, r)); else if (n) {
                    var u = t.get(n.dimensions[0], r), h = t.get(n.dimensions[1], r);
                    a = n.dataToPoint([u, h])
                }
            } else a = [s, l];
            isNaN(s) || (a[0] = s), isNaN(l) || (a[1] = l), t.setItemLayout(r, a)
        })
    }

    function hp(t, e, i) {
        var n;
        n = t ? p(t && t.dimensions, function (t) {
            var i = e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {};
            return s({name: t}, i)
        }) : [{name: "value", type: "float"}];
        var r = new Jw(n, i), a = p(i.get("data"), x(np, e));
        return t && (a = m(a, x(op, t))), r.initData(a, null, t ? sp : function (t) {
            return t.value
        }), r
    }

    function cp(t) {
        return isNaN(+t.cpx1) || isNaN(+t.cpy1)
    }

    function dp(t) {
        return "_" + t + "Type"
    }

    function fp(t, e, i) {
        var n = e.getItemVisual(i, t);
        if (n && "none" !== n) {
            var r = e.getItemVisual(i, "color"), a = e.getItemVisual(i, t + "Size"),
                o = e.getItemVisual(i, t + "Rotate");
            _(a) || (a = [a, a]);
            var s = Yh(n, -a[0] / 2, -a[1] / 2, a[0], a[1], r);
            return s.__specifiedRotation = null == o || isNaN(o) ? void 0 : +o * Math.PI / 180 || 0, s.name = t, s
        }
    }

    function pp(t) {
        var e = new lI({name: "line", subPixelOptimize: !0});
        return gp(e.shape, t), e
    }

    function gp(t, e) {
        t.x1 = e[0][0], t.y1 = e[0][1], t.x2 = e[1][0], t.y2 = e[1][1], t.percent = 1;
        var i = e[2];
        i ? (t.cpx1 = i[0], t.cpy1 = i[1]) : (t.cpx1 = 0 / 0, t.cpy1 = 0 / 0)
    }

    function mp() {
        var t = this, e = t.childOfName("fromSymbol"), i = t.childOfName("toSymbol"), n = t.childOfName("label");
        if (e || i || !n.ignore) {
            for (var r = 1, a = this.parent; a;) a.scale && (r /= a.scale[0]), a = a.parent;
            var o = t.childOfName("line");
            if (this.__dirty || o.__dirty) {
                var s = o.shape.percent, l = o.pointAt(0), u = o.pointAt(s), h = q([], u, l);
                if (te(h, h), e) {
                    e.attr("position", l);
                    var c = e.__specifiedRotation;
                    if (null == c) {
                        var d = o.tangentAt(0);
                        e.attr("rotation", Math.PI / 2 - Math.atan2(d[1], d[0]))
                    } else e.attr("rotation", c);
                    e.attr("scale", [r * s, r * s])
                }
                if (i) {
                    i.attr("position", u);
                    var c = i.__specifiedRotation;
                    if (null == c) {
                        var d = o.tangentAt(1);
                        i.attr("rotation", -Math.PI / 2 - Math.atan2(d[1], d[0]))
                    } else i.attr("rotation", c);
                    i.attr("scale", [r * s, r * s])
                }
                if (!n.ignore) {
                    n.attr("position", u);
                    var f, p, g, m, v = n.__labelDistance, y = v[0] * r, x = v[1] * r, _ = s / 2, d = o.tangentAt(_),
                        w = [d[1], -d[0]], b = o.pointAt(_);
                    w[1] > 0 && (w[0] = -w[0], w[1] = -w[1]);
                    var S = d[0] < 0 ? -1 : 1;
                    if ("start" !== n.__position && "end" !== n.__position) {
                        var M = -Math.atan2(d[1], d[0]);
                        u[0] < l[0] && (M = Math.PI + M), n.attr("rotation", M)
                    }
                    var I;
                    switch (n.__position) {
                        case"insideStartTop":
                        case"insideMiddleTop":
                        case"insideEndTop":
                        case"middle":
                            I = -x, g = "bottom";
                            break;
                        case"insideStartBottom":
                        case"insideMiddleBottom":
                        case"insideEndBottom":
                            I = x, g = "top";
                            break;
                        default:
                            I = 0, g = "middle"
                    }
                    switch (n.__position) {
                        case"end":
                            f = [h[0] * y + u[0], h[1] * x + u[1]], p = h[0] > .8 ? "left" : h[0] < -.8 ? "right" : "center", g = h[1] > .8 ? "top" : h[1] < -.8 ? "bottom" : "middle";
                            break;
                        case"start":
                            f = [-h[0] * y + l[0], -h[1] * x + l[1]], p = h[0] > .8 ? "right" : h[0] < -.8 ? "left" : "center", g = h[1] > .8 ? "bottom" : h[1] < -.8 ? "top" : "middle";
                            break;
                        case"insideStartTop":
                        case"insideStart":
                        case"insideStartBottom":
                            f = [y * S + l[0], l[1] + I], p = d[0] < 0 ? "right" : "left", m = [-y * S, -I];
                            break;
                        case"insideMiddleTop":
                        case"insideMiddle":
                        case"insideMiddleBottom":
                        case"middle":
                            f = [b[0], b[1] + I], p = "center", m = [0, -I];
                            break;
                        case"insideEndTop":
                        case"insideEnd":
                        case"insideEndBottom":
                            f = [-y * S + u[0], u[1] + I], p = d[0] >= 0 ? "right" : "left", m = [y * S, -I]
                    }
                    n.attr({
                        style: {textVerticalAlign: n.__verticalAlign || g, textAlign: n.__textAlign || p},
                        position: f,
                        scale: [r, r],
                        origin: m
                    })
                }
            }
        }
    }

    function vp(t, e, i) {
        am.call(this), this._createLine(t, e, i)
    }

    function yp(t) {
        this._ctor = t || vp, this.group = new am
    }

    function xp(t, e, i, n) {
        var r = e.getItemLayout(i);
        if (Mp(r)) {
            var a = new t._ctor(e, i, n);
            e.setItemGraphicEl(i, a), t.group.add(a)
        }
    }

    function _p(t, e, i, n, r, a) {
        var o = e.getItemGraphicEl(n);
        return Mp(i.getItemLayout(r)) ? (o ? o.updateData(i, r, a) : o = new t._ctor(i, r, a), i.setItemGraphicEl(r, o), void t.group.add(o)) : void t.group.remove(o)
    }

    function wp(t) {
        return t.animators && t.animators.length > 0
    }

    function bp(t) {
        var e = t.hostModel;
        return {
            lineStyle: e.getModel("lineStyle").getLineStyle(),
            hoverLineStyle: e.getModel("emphasis.lineStyle").getLineStyle(),
            labelModel: e.getModel("label"),
            hoverLabelModel: e.getModel("emphasis.label")
        }
    }

    function Sp(t) {
        return isNaN(t[0]) || isNaN(t[1])
    }

    function Mp(t) {
        return !Sp(t[0]) && !Sp(t[1])
    }

    function Ip(t) {
        return !isNaN(t) && !isFinite(t)
    }

    function Cp(t, e, i, n) {
        var r = 1 - t, a = n.dimensions[t];
        return Ip(e[r]) && Ip(i[r]) && e[t] === i[t] && n.getAxis(a).containData(e[t])
    }

    function Tp(t, e) {
        if ("cartesian2d" === t.type) {
            var i = e[0].coord, n = e[1].coord;
            if (i && n && (Cp(1, i, n, t) || Cp(0, i, n, t))) return !0
        }
        return op(t, e[0]) && op(t, e[1])
    }

    function Dp(t, e, i, n, r) {
        var a, o = n.coordinateSystem, s = t.getItemModel(e), l = wo(s.get("x"), r.getWidth()),
            u = wo(s.get("y"), r.getHeight());
        if (isNaN(l) || isNaN(u)) {
            if (n.getMarkerPosition) a = n.getMarkerPosition(t.getValues(t.dimensions, e)); else {
                var h = o.dimensions, c = t.get(h[0], e), d = t.get(h[1], e);
                a = o.dataToPoint([c, d])
            }
            if ("cartesian2d" === o.type) {
                var f = o.getAxis("x"), p = o.getAxis("y"), h = o.dimensions;
                Ip(t.get(h[0], e)) ? a[0] = f.toGlobalCoord(f.getExtent()[i ? 0 : 1]) : Ip(t.get(h[1], e)) && (a[1] = p.toGlobalCoord(p.getExtent()[i ? 0 : 1]))
            }
            isNaN(l) || (a[0] = l), isNaN(u) || (a[1] = u)
        } else a = [l, u];
        t.setItemLayout(e, a)
    }

    function Ap(t, e, i) {
        var n;
        n = t ? p(t && t.dimensions, function (t) {
            var i = e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {};
            return s({name: t}, i)
        }) : [{name: "value", type: "float"}];
        var r = new Jw(n, i), a = new Jw(n, i), o = new Jw([], i), l = p(i.get("data"), x(dI, e, t, i));
        t && (l = m(l, x(Tp, t)));
        var u = t ? sp : function (t) {
            return t.value
        };
        return r.initData(p(l, function (t) {
            return t[0]
        }), null, u), a.initData(p(l, function (t) {
            return t[1]
        }), null, u), o.initData(p(l, function (t) {
            return t[2]
        })), o.hasItemOption = !0, {from: r, to: a, line: o}
    }

    function kp(t) {
        return !isNaN(t) && !isFinite(t)
    }

    function Pp(t, e, i) {
        var n = 1 - t;
        return kp(e[n]) && kp(i[n])
    }

    function Lp(t, e) {
        var i = e.coord[0], n = e.coord[1];
        return "cartesian2d" === t.type && i && n && (Pp(1, i, n, t) || Pp(0, i, n, t)) ? !0 : op(t, {
            coord: i,
            x: e.x0,
            y: e.y0
        }) || op(t, {coord: n, x: e.x1, y: e.y1})
    }

    function Op(t, e, i, n, r) {
        var a, o = n.coordinateSystem, s = t.getItemModel(e), l = wo(s.get(i[0]), r.getWidth()),
            u = wo(s.get(i[1]), r.getHeight());
        if (isNaN(l) || isNaN(u)) {
            if (n.getMarkerPosition) a = n.getMarkerPosition(t.getValues(i, e)); else {
                var h = t.get(i[0], e), c = t.get(i[1], e), d = [h, c];
                o.clampData && o.clampData(d, d), a = o.dataToPoint(d, !0)
            }
            if ("cartesian2d" === o.type) {
                var f = o.getAxis("x"), p = o.getAxis("y"), h = t.get(i[0], e), c = t.get(i[1], e);
                kp(h) ? a[0] = f.toGlobalCoord(f.getExtent()["x0" === i[0] ? 0 : 1]) : kp(c) && (a[1] = p.toGlobalCoord(p.getExtent()["y0" === i[1] ? 0 : 1]))
            }
            isNaN(l) || (a[0] = l), isNaN(u) || (a[1] = u)
        } else a = [l, u];
        return a
    }

    function zp(t, e, i) {
        var n, r, a = ["x0", "y0", "x1", "y1"];
        t ? (n = p(t && t.dimensions, function (t) {
            var i = e.getData(), n = i.getDimensionInfo(i.mapDimension(t)) || {};
            return s({name: t}, n)
        }), r = new Jw(p(a, function (t, e) {
            return {name: t, type: n[e % 2].type}
        }), i)) : (n = [{name: "value", type: "float"}], r = new Jw(n, i));
        var o = p(i.get("data"), x(fI, e, t, i));
        t && (o = m(o, x(Lp, t)));
        var l = t ? function (t, e, i, n) {
            return t.coord[Math.floor(n / 2)][n % 2]
        } : function (t) {
            return t.value
        };
        return r.initData(o, null, l), r.hasItemOption = !0, r
    }

    function Bp(t) {
        var e = t.type, i = {number: "value", time: "time"};
        if (i[e] && (t.axisType = i[e], delete t.type), Ep(t), Np(t, "controlPosition")) {
            var n = t.controlStyle || (t.controlStyle = {});
            Np(n, "position") || (n.position = t.controlPosition), "none" !== n.position || Np(n, "show") || (n.show = !1, delete n.position), delete t.controlPosition
        }
        f(t.data || [], function (t) {
            S(t) && !_(t) && (!Np(t, "value") && Np(t, "name") && (t.value = t.name), Ep(t))
        })
    }

    function Ep(t) {
        var e = t.itemStyle || (t.itemStyle = {}), i = e.emphasis || (e.emphasis = {}), n = t.label || t.label || {},
            r = n.normal || (n.normal = {}), a = {normal: 1, emphasis: 1};
        f(n, function (t, e) {
            a[e] || Np(r, e) || (r[e] = t)
        }), i.label && !Np(n, "emphasis") && (n.emphasis = i.label, delete i.label)
    }

    function Np(t, e) {
        return t.hasOwnProperty(e)
    }

    function Rp(t, e) {
        return Ko(t.getBoxLayoutParams(), {width: e.getWidth(), height: e.getHeight()}, t.get("padding"))
    }

    function Fp(t, e, i, n) {
        var r = n.style, a = so(t.get(e), n || {}, new Ii(i[0], i[1], i[2], i[3]));
        return r && a.setStyle(r), a
    }

    function Vp(t, e, i, n, a, o) {
        var s = e.get("color");
        if (a) a.setColor(s), i.add(a), o && o.onUpdate(a);
        else {
            var l = t.get("symbol");
            a = Yh(l, -1, -1, 2, 2, s), a.setStyle("strokeNoScale", !0), i.add(a), o && o.onCreate(a)
        }
        var u = e.getItemStyle(["color", "symbol", "symbolSize"]);
        a.setStyle(u), n = r({rectHover: !0, z2: 100}, n, !0);
        var h = t.get("symbolSize");
        h = h instanceof Array ? h.slice() : [+h, +h], h[0] /= 2, h[1] /= 2, n.scale = h;
        var c = t.get("symbolOffset");
        if (c) {
            var d = n.position = n.position || [0, 0];
            d[0] += wo(c[0], h[0]), d[1] += wo(c[1], h[1])
        }
        var f = t.get("symbolRotate");
        return n.rotation = (f || 0) * Math.PI / 180 || 0, a.attr(n), a.updateTransform(), a
    }

    function Gp(t, e, i, n, r) {
        if (!t.dragging) {
            var a = n.getModel("checkpointStyle"), o = i.dataToCoord(n.getData().get(["value"], e));
            r || !a.get("animation", !0) ? t.attr({position: [o, 0]}) : (t.stopAnimation(!0), t.animateTo({position: [o, 0]}, a.get("animationDuration", !0), a.get("animationEasing", !0)))
        }
    }

    var Hp = 2311, Wp = function () {
        return Hp++
    }, Xp = {};
    Xp = "object" == typeof wx && "function" == typeof wx.getSystemInfoSync ? {
        browser: {},
        os: {},
        node: !1,
        wxa: !0,
        canvasSupported: !0,
        svgSupported: !1,
        touchEventsSupported: !0,
        domSupported: !1
    } : "undefined" == typeof document && "undefined" != typeof self ? {
        browser: {},
        os: {},
        node: !1,
        worker: !0,
        canvasSupported: !0,
        domSupported: !1
    } : "undefined" == typeof navigator ? {
        browser: {},
        os: {},
        node: !0,
        worker: !1,
        canvasSupported: !0,
        svgSupported: !0,
        domSupported: !1
    } : e(navigator.userAgent);
    var Up = Xp, Yp = {
            "[object Function]": 1,
            "[object RegExp]": 1,
            "[object Date]": 1,
            "[object Error]": 1,
            "[object CanvasGradient]": 1,
            "[object CanvasPattern]": 1,
            "[object Image]": 1,
            "[object Canvas]": 1
        }, qp = {
            "[object Int8Array]": 1,
            "[object Uint8Array]": 1,
            "[object Uint8ClampedArray]": 1,
            "[object Int16Array]": 1,
            "[object Uint16Array]": 1,
            "[object Int32Array]": 1,
            "[object Uint32Array]": 1,
            "[object Float32Array]": 1,
            "[object Float64Array]": 1
        }, jp = Object.prototype.toString, Zp = Array.prototype, Kp = Zp.forEach, $p = Zp.filter, Qp = Zp.slice,
        Jp = Zp.map, tg = Zp.reduce, eg = {}, ig = function () {
            return eg.createCanvas()
        };
    eg.createCanvas = function () {
        return document.createElement("canvas")
    };
    var ng, rg = "__ec_primitive__";
    N.prototype = {
        constructor: N, get: function (t) {
            return this.data.hasOwnProperty(t) ? this.data[t] : null
        }, set: function (t, e) {
            return this.data[t] = e
        }, each: function (t, e) {
            void 0 !== e && (t = y(t, e));
            for (var i in this.data) this.data.hasOwnProperty(i) && t(this.data[i], i)
        }, removeKey: function (t) {
            delete this.data[t]
        }
    };
    var ag = (Object.freeze || Object)({
            $override: i,
            clone: n,
            merge: r,
            mergeAll: a,
            extend: o,
            defaults: s,
            createCanvas: ig,
            getContext: l,
            indexOf: u,
            inherits: h,
            mixin: c,
            isArrayLike: d,
            each: f,
            map: p,
            reduce: g,
            filter: m,
            find: v,
            bind: y,
            curry: x,
            isArray: _,
            isFunction: w,
            isString: b,
            isObject: S,
            isBuiltInObject: M,
            isTypedArray: I,
            isDom: C,
            eqNaN: T,
            retrieve: D,
            retrieve2: A,
            retrieve3: k,
            slice: P,
            normalizeCssArray: L,
            assert: O,
            trim: z,
            setAsPrimitive: B,
            isPrimitive: E,
            createHashMap: R,
            concatArray: F,
            noop: V
        }), og = "undefined" == typeof Float32Array ? Array : Float32Array, sg = j, lg = Z, ug = ee, hg = ie,
        cg = (Object.freeze || Object)({
            create: G,
            copy: H,
            clone: W,
            set: X,
            add: U,
            scaleAndAdd: Y,
            sub: q,
            len: j,
            length: sg,
            lenSquare: Z,
            lengthSquare: lg,
            mul: K,
            div: $,
            dot: Q,
            scale: J,
            normalize: te,
            distance: ee,
            dist: ug,
            distanceSquare: ie,
            distSquare: hg,
            negate: ne,
            lerp: re,
            applyTransform: ae,
            min: oe,
            max: se
        });
    le.prototype = {
        constructor: le, _dragStart: function (t) {
            for (var e = t.target; e && !e.draggable;) e = e.parent;
            e && (this._draggingTarget = e, e.dragging = !0, this._x = t.offsetX, this._y = t.offsetY, this.dispatchToElement(ue(e, t), "dragstart", t.event))
        }, _drag: function (t) {
            var e = this._draggingTarget;
            if (e) {
                var i = t.offsetX, n = t.offsetY, r = i - this._x, a = n - this._y;
                this._x = i, this._y = n, e.drift(r, a, t), this.dispatchToElement(ue(e, t), "drag", t.event);
                var o = this.findHover(i, n, e).target, s = this._dropTarget;
                this._dropTarget = o, e !== o && (s && o !== s && this.dispatchToElement(ue(s, t), "dragleave", t.event), o && o !== s && this.dispatchToElement(ue(o, t), "dragenter", t.event))
            }
        }, _dragEnd: function (t) {
            var e = this._draggingTarget;
            e && (e.dragging = !1), this.dispatchToElement(ue(e, t), "dragend", t.event), this._dropTarget && this.dispatchToElement(ue(this._dropTarget, t), "drop", t.event), this._draggingTarget = null, this._dropTarget = null
        }
    };
    var dg = Array.prototype.slice, fg = function (t) {
        this._$handlers = {}, this._$eventProcessor = t
    };
    fg.prototype = {
        constructor: fg, one: function (t, e, i, n) {
            return ce(this, t, e, i, n, !0)
        }, on: function (t, e, i, n) {
            return ce(this, t, e, i, n, !1)
        }, isSilent: function (t) {
            var e = this._$handlers;
            return !e[t] || !e[t].length
        }, off: function (t, e) {
            var i = this._$handlers;
            if (!t) return this._$handlers = {}, this;
            if (e) {
                if (i[t]) {
                    for (var n = [], r = 0, a = i[t].length; a > r; r++) i[t][r].h !== e && n.push(i[t][r]);
                    i[t] = n
                }
                i[t] && 0 === i[t].length && delete i[t]
            } else delete i[t];
            return this
        }, trigger: function (t) {
            var e = this._$handlers[t], i = this._$eventProcessor;
            if (e) {
                var n = arguments, r = n.length;
                r > 3 && (n = dg.call(n, 1));
                for (var a = e.length, o = 0; a > o;) {
                    var s = e[o];
                    if (i && i.filter && null != s.query && !i.filter(t, s.query)) o++; else {
                        switch (r) {
                            case 1:
                                s.h.call(s.ctx);
                                break;
                            case 2:
                                s.h.call(s.ctx, n[1]);
                                break;
                            case 3:
                                s.h.call(s.ctx, n[1], n[2]);
                                break;
                            default:
                                s.h.apply(s.ctx, n)
                        }
                        s.one ? (e.splice(o, 1), a--) : o++
                    }
                }
            }
            return i && i.afterTrigger && i.afterTrigger(t), this
        }, triggerWithContext: function (t) {
            var e = this._$handlers[t], i = this._$eventProcessor;
            if (e) {
                var n = arguments, r = n.length;
                r > 4 && (n = dg.call(n, 1, n.length - 1));
                for (var a = n[n.length - 1], o = e.length, s = 0; o > s;) {
                    var l = e[s];
                    if (i && i.filter && null != l.query && !i.filter(t, l.query)) s++; else {
                        switch (r) {
                            case 1:
                                l.h.call(a);
                                break;
                            case 2:
                                l.h.call(a, n[1]);
                                break;
                            case 3:
                                l.h.call(a, n[1], n[2]);
                                break;
                            default:
                                l.h.apply(a, n)
                        }
                        l.one ? (e.splice(s, 1), o--) : s++
                    }
                }
            }
            return i && i.afterTrigger && i.afterTrigger(t), this
        }
    };
    var pg = Math.log(2), gg = "___zrEVENTSAVED", mg = [],
        vg = "undefined" != typeof window && !!window.addEventListener,
        yg = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, xg = [], _g = vg ? function (t) {
            t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0
        } : function (t) {
            t.returnValue = !1, t.cancelBubble = !0
        }, wg = function () {
            this._track = []
        };
    wg.prototype = {
        constructor: wg, recognize: function (t, e, i) {
            return this._doTrack(t, e, i), this._recognize(t)
        }, clear: function () {
            return this._track.length = 0, this
        }, _doTrack: function (t, e, i) {
            var n = t.touches;
            if (n) {
                for (var r = {points: [], touches: [], target: e, event: t}, a = 0, o = n.length; o > a; a++) {
                    var s = n[a], l = xe(i, s, {});
                    r.points.push([l.zrX, l.zrY]), r.touches.push(s)
                }
                this._track.push(r)
            }
        }, _recognize: function (t) {
            for (var e in bg) if (bg.hasOwnProperty(e)) {
                var i = bg[e](this._track, t);
                if (i) return i
            }
        }
    };
    var bg = {
        pinch: function (t, e) {
            var i = t.length;
            if (i) {
                var n = (t[i - 1] || {}).points, r = (t[i - 2] || {}).points || n;
                if (r && r.length > 1 && n && n.length > 1) {
                    var a = Ie(n) / Ie(r);
                    !isFinite(a) && (a = 1), e.pinchScale = a;
                    var o = Ce(n);
                    return e.pinchX = o[0], e.pinchY = o[1], {type: "pinch", target: t[0].target, event: e}
                }
            }
        }
    }, Sg = "silent";
    Ae.prototype.dispose = function () {
    };
    var Mg = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
        Ig = function (t, e, i, n) {
            fg.call(this), this.storage = t, this.painter = e, this.painterRoot = n, i = i || new Ae, this.proxy = null, this._hovered = {}, this._lastTouchMoment, this._lastX, this._lastY, this._gestureMgr, le.call(this), this.setHandlerProxy(i)
        };
    Ig.prototype = {
        constructor: Ig, setHandlerProxy: function (t) {
            this.proxy && this.proxy.dispose(), t && (f(Mg, function (e) {
                t.on && t.on(e, this[e], this)
            }, this), t.handler = this), this.proxy = t
        }, mousemove: function (t) {
            var e = t.zrX, i = t.zrY, n = Pe(this, e, i), r = this._hovered, a = r.target;
            a && !a.__zr && (r = this.findHover(r.x, r.y), a = r.target);
            var o = this._hovered = n ? {x: e, y: i} : this.findHover(e, i), s = o.target, l = this.proxy;
            l.setCursor && l.setCursor(s ? s.cursor : "default"), a && s !== a && this.dispatchToElement(r, "mouseout", t), this.dispatchToElement(o, "mousemove", t), s && s !== a && this.dispatchToElement(o, "mouseover", t)
        }, mouseout: function (t) {
            var e = t.zrEventControl, i = t.zrIsToLocalDOM;
            "only_globalout" !== e && this.dispatchToElement(this._hovered, "mouseout", t), "no_globalout" !== e && !i && this.trigger("globalout", {
                type: "globalout",
                event: t
            })
        }, resize: function () {
            this._hovered = {}
        }, dispatch: function (t, e) {
            var i = this[t];
            i && i.call(this, e)
        }, dispose: function () {
            this.proxy.dispose(), this.storage = this.proxy = this.painter = null
        }, setCursorStyle: function (t) {
            var e = this.proxy;
            e.setCursor && e.setCursor(t)
        }, dispatchToElement: function (t, e, i) {
            t = t || {};
            var n = t.target;
            if (!n || !n.silent) {
                for (var r = "on" + e, a = Te(e, t, i); n && (n[r] && (a.cancelBubble = n[r].call(n, a)), n.trigger(e, a), n = n.parent, !a.cancelBubble);) ;
                a.cancelBubble || (this.trigger(e, a), this.painter && this.painter.eachOtherLayer(function (t) {
                    "function" == typeof t[r] && t[r].call(t, a), t.trigger && t.trigger(e, a)
                }))
            }
        }, findHover: function (t, e, i) {
            for (var n = this.storage.getDisplayList(), r = {x: t, y: e}, a = n.length - 1; a >= 0; a--) {
                var o;
                if (n[a] !== i && !n[a].ignore && (o = ke(n[a], t, e)) && (!r.topTarget && (r.topTarget = n[a]), o !== Sg)) {
                    r.target = n[a];
                    break
                }
            }
            return r
        }, processGesture: function (t, e) {
            this._gestureMgr || (this._gestureMgr = new wg);
            var i = this._gestureMgr;
            "start" === e && i.clear();
            var n = i.recognize(t, this.findHover(t.zrX, t.zrY, null).target, this.proxy.dom);
            if ("end" === e && i.clear(), n) {
                var r = n.type;
                t.gestureEvent = r, this.dispatchToElement({target: n.target}, r, n.event)
            }
        }
    }, f(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function (t) {
        Ig.prototype[t] = function (e) {
            var i, n, r = e.zrX, a = e.zrY, o = Pe(this, r, a);
            if ("mouseup" === t && o || (i = this.findHover(r, a), n = i.target), "mousedown" === t) this._downEl = n, this._downPoint = [e.zrX, e.zrY], this._upEl = n; else if ("mouseup" === t) this._upEl = n; else if ("click" === t) {
                if (this._downEl !== this._upEl || !this._downPoint || ug(this._downPoint, [e.zrX, e.zrY]) > 4) return;
                this._downPoint = null
            }
            this.dispatchToElement(i, t, e)
        }
    }), c(Ig, fg), c(Ig, le);
    var Cg = "undefined" == typeof Float32Array ? Array : Float32Array, Tg = (Object.freeze || Object)({
        create: Le,
        identity: Oe,
        copy: ze,
        mul: Be,
        translate: Ee,
        rotate: Ne,
        scale: Re,
        invert: Fe,
        clone: Ve
    }), Dg = Oe, Ag = 5e-5, kg = function (t) {
        t = t || {}, t.position || (this.position = [0, 0]), null == t.rotation && (this.rotation = 0), t.scale || (this.scale = [1, 1]), this.origin = this.origin || null
    }, Pg = kg.prototype;
    Pg.transform = null, Pg.needLocalTransform = function () {
        return Ge(this.rotation) || Ge(this.position[0]) || Ge(this.position[1]) || Ge(this.scale[0] - 1) || Ge(this.scale[1] - 1)
    };
    var Lg = [];
    Pg.updateTransform = function () {
        var t = this.parent, e = t && t.transform, i = this.needLocalTransform(), n = this.transform;
        if (!i && !e) return void (n && Dg(n));
        n = n || Le(), i ? this.getLocalTransform(n) : Dg(n), e && (i ? Be(n, t.transform, n) : ze(n, t.transform)), this.transform = n;
        var r = this.globalScaleRatio;
        if (null != r && 1 !== r) {
            this.getGlobalScale(Lg);
            var a = Lg[0] < 0 ? -1 : 1, o = Lg[1] < 0 ? -1 : 1, s = ((Lg[0] - a) * r + a) / Lg[0] || 0,
                l = ((Lg[1] - o) * r + o) / Lg[1] || 0;
            n[0] *= s, n[1] *= s, n[2] *= l, n[3] *= l
        }
        this.invTransform = this.invTransform || Le(), Fe(this.invTransform, n)
    }, Pg.getLocalTransform = function (t) {
        return kg.getLocalTransform(this, t)
    }, Pg.setTransform = function (t) {
        var e = this.transform, i = t.dpr || 1;
        e ? t.setTransform(i * e[0], i * e[1], i * e[2], i * e[3], i * e[4], i * e[5]) : t.setTransform(i, 0, 0, i, 0, 0)
    }, Pg.restoreTransform = function (t) {
        var e = t.dpr || 1;
        t.setTransform(e, 0, 0, e, 0, 0)
    };
    var Og = [], zg = Le();
    Pg.setLocalTransform = function (t) {
        if (t) {
            var e = t[0] * t[0] + t[1] * t[1], i = t[2] * t[2] + t[3] * t[3], n = this.position, r = this.scale;
            Ge(e - 1) && (e = Math.sqrt(e)), Ge(i - 1) && (i = Math.sqrt(i)), t[0] < 0 && (e = -e), t[3] < 0 && (i = -i), n[0] = t[4], n[1] = t[5], r[0] = e, r[1] = i, this.rotation = Math.atan2(-t[1] / i, t[0] / e)
        }
    }, Pg.decomposeTransform = function () {
        if (this.transform) {
            var t = this.parent, e = this.transform;
            t && t.transform && (Be(Og, t.invTransform, e), e = Og);
            var i = this.origin;
            i && (i[0] || i[1]) && (zg[4] = i[0], zg[5] = i[1], Be(Og, e, zg), Og[4] -= i[0], Og[5] -= i[1], e = Og), this.setLocalTransform(e)
        }
    }, Pg.getGlobalScale = function (t) {
        var e = this.transform;
        return t = t || [], e ? (t[0] = Math.sqrt(e[0] * e[0] + e[1] * e[1]), t[1] = Math.sqrt(e[2] * e[2] + e[3] * e[3]), e[0] < 0 && (t[0] = -t[0]), e[3] < 0 && (t[1] = -t[1]), t) : (t[0] = 1, t[1] = 1, t)
    }, Pg.transformCoordToLocal = function (t, e) {
        var i = [t, e], n = this.invTransform;
        return n && ae(i, i, n), i
    }, Pg.transformCoordToGlobal = function (t, e) {
        var i = [t, e], n = this.transform;
        return n && ae(i, i, n), i
    }, kg.getLocalTransform = function (t, e) {
        e = e || [], Dg(e);
        var i = t.origin, n = t.scale || [1, 1], r = t.rotation || 0, a = t.position || [0, 0];
        return i && (e[4] -= i[0], e[5] -= i[1]), Re(e, e, n), r && Ne(e, e, r), i && (e[4] += i[0], e[5] += i[1]), e[4] += a[0], e[5] += a[1], e
    };
    var Bg = {
        linear: function (t) {
            return t
        }, quadraticIn: function (t) {
            return t * t
        }, quadraticOut: function (t) {
            return t * (2 - t)
        }, quadraticInOut: function (t) {
            return (t *= 2) < 1 ? .5 * t * t : -.5 * (--t * (t - 2) - 1)
        }, cubicIn: function (t) {
            return t * t * t
        }, cubicOut: function (t) {
            return --t * t * t + 1
        }, cubicInOut: function (t) {
            return (t *= 2) < 1 ? .5 * t * t * t : .5 * ((t -= 2) * t * t + 2)
        }, quarticIn: function (t) {
            return t * t * t * t
        }, quarticOut: function (t) {
            return 1 - --t * t * t * t
        }, quarticInOut: function (t) {
            return (t *= 2) < 1 ? .5 * t * t * t * t : -.5 * ((t -= 2) * t * t * t - 2)
        }, quinticIn: function (t) {
            return t * t * t * t * t
        }, quinticOut: function (t) {
            return --t * t * t * t * t + 1
        }, quinticInOut: function (t) {
            return (t *= 2) < 1 ? .5 * t * t * t * t * t : .5 * ((t -= 2) * t * t * t * t + 2)
        }, sinusoidalIn: function (t) {
            return 1 - Math.cos(t * Math.PI / 2)
        }, sinusoidalOut: function (t) {
            return Math.sin(t * Math.PI / 2)
        }, sinusoidalInOut: function (t) {
            return .5 * (1 - Math.cos(Math.PI * t))
        }, exponentialIn: function (t) {
            return 0 === t ? 0 : Math.pow(1024, t - 1)
        }, exponentialOut: function (t) {
            return 1 === t ? 1 : 1 - Math.pow(2, -10 * t)
        }, exponentialInOut: function (t) {
            return 0 === t ? 0 : 1 === t ? 1 : (t *= 2) < 1 ? .5 * Math.pow(1024, t - 1) : .5 * (-Math.pow(2, -10 * (t - 1)) + 2)
        }, circularIn: function (t) {
            return 1 - Math.sqrt(1 - t * t)
        }, circularOut: function (t) {
            return Math.sqrt(1 - --t * t)
        }, circularInOut: function (t) {
            return (t *= 2) < 1 ? -.5 * (Math.sqrt(1 - t * t) - 1) : .5 * (Math.sqrt(1 - (t -= 2) * t) + 1)
        }, elasticIn: function (t) {
            var e, i = .1, n = .4;
            return 0 === t ? 0 : 1 === t ? 1 : (!i || 1 > i ? (i = 1, e = n / 4) : e = n * Math.asin(1 / i) / (2 * Math.PI), -(i * Math.pow(2, 10 * (t -= 1)) * Math.sin(2 * (t - e) * Math.PI / n)))
        }, elasticOut: function (t) {
            var e, i = .1, n = .4;
            return 0 === t ? 0 : 1 === t ? 1 : (!i || 1 > i ? (i = 1, e = n / 4) : e = n * Math.asin(1 / i) / (2 * Math.PI), i * Math.pow(2, -10 * t) * Math.sin(2 * (t - e) * Math.PI / n) + 1)
        }, elasticInOut: function (t) {
            var e, i = .1, n = .4;
            return 0 === t ? 0 : 1 === t ? 1 : (!i || 1 > i ? (i = 1, e = n / 4) : e = n * Math.asin(1 / i) / (2 * Math.PI), (t *= 2) < 1 ? -.5 * i * Math.pow(2, 10 * (t -= 1)) * Math.sin(2 * (t - e) * Math.PI / n) : i * Math.pow(2, -10 * (t -= 1)) * Math.sin(2 * (t - e) * Math.PI / n) * .5 + 1)
        }, backIn: function (t) {
            var e = 1.70158;
            return t * t * ((e + 1) * t - e)
        }, backOut: function (t) {
            var e = 1.70158;
            return --t * t * ((e + 1) * t + e) + 1
        }, backInOut: function (t) {
            var e = 2.5949095;
            return (t *= 2) < 1 ? .5 * t * t * ((e + 1) * t - e) : .5 * ((t -= 2) * t * ((e + 1) * t + e) + 2)
        }, bounceIn: function (t) {
            return 1 - Bg.bounceOut(1 - t)
        }, bounceOut: function (t) {
            return 1 / 2.75 > t ? 7.5625 * t * t : 2 / 2.75 > t ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : 2.5 / 2.75 > t ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375
        }, bounceInOut: function (t) {
            return .5 > t ? .5 * Bg.bounceIn(2 * t) : .5 * Bg.bounceOut(2 * t - 1) + .5
        }
    };
    He.prototype = {
        constructor: He, step: function (t, e) {
            if (this._initialized || (this._startTime = t + this._delay, this._initialized = !0), this._paused) return void (this._pausedTime += e);
            var i = (t - this._startTime - this._pausedTime) / this._life;
            if (!(0 > i)) {
                i = Math.min(i, 1);
                var n = this.easing, r = "string" == typeof n ? Bg[n] : n, a = "function" == typeof r ? r(i) : i;
                return this.fire("frame", a), 1 === i ? this.loop ? (this.restart(t), "restart") : (this._needsRemove = !0, "destroy") : null
            }
        }, restart: function (t) {
            var e = (t - this._startTime - this._pausedTime) % this._life;
            this._startTime = t - e + this.gap, this._pausedTime = 0, this._needsRemove = !1
        }, fire: function (t, e) {
            t = "on" + t, this[t] && this[t](this._target, e)
        }, pause: function () {
            this._paused = !0
        }, resume: function () {
            this._paused = !1
        }
    };
    var Eg = function () {
        this.head = null, this.tail = null, this._len = 0
    }, Ng = Eg.prototype;
    Ng.insert = function (t) {
        var e = new Rg(t);
        return this.insertEntry(e), e
    }, Ng.insertEntry = function (t) {
        this.head ? (this.tail.next = t, t.prev = this.tail, t.next = null, this.tail = t) : this.head = this.tail = t, this._len++
    }, Ng.remove = function (t) {
        var e = t.prev, i = t.next;
        e ? e.next = i : this.head = i, i ? i.prev = e : this.tail = e, t.next = t.prev = null, this._len--
    }, Ng.len = function () {
        return this._len
    }, Ng.clear = function () {
        this.head = this.tail = null, this._len = 0
    };
    var Rg = function (t) {
        this.value = t, this.next, this.prev
    }, Fg = function (t) {
        this._list = new Eg, this._map = {}, this._maxSize = t || 10, this._lastRemovedEntry = null
    }, Vg = Fg.prototype;
    Vg.put = function (t, e) {
        var i = this._list, n = this._map, r = null;
        if (null == n[t]) {
            var a = i.len(), o = this._lastRemovedEntry;
            if (a >= this._maxSize && a > 0) {
                var s = i.head;
                i.remove(s), delete n[s.key], r = s.value, this._lastRemovedEntry = s
            }
            o ? o.value = e : o = new Rg(e), o.key = t, i.insertEntry(o), n[t] = o
        }
        return r
    }, Vg.get = function (t) {
        var e = this._map[t], i = this._list;
        return null != e ? (e !== i.tail && (i.remove(e), i.insertEntry(e)), e.value) : void 0
    }, Vg.clear = function () {
        this._list.clear(), this._map = {}
    };
    var Gg = {
        transparent: [0, 0, 0, 0],
        aliceblue: [240, 248, 255, 1],
        antiquewhite: [250, 235, 215, 1],
        aqua: [0, 255, 255, 1],
        aquamarine: [127, 255, 212, 1],
        azure: [240, 255, 255, 1],
        beige: [245, 245, 220, 1],
        bisque: [255, 228, 196, 1],
        black: [0, 0, 0, 1],
        blanchedalmond: [255, 235, 205, 1],
        blue: [0, 0, 255, 1],
        blueviolet: [138, 43, 226, 1],
        brown: [165, 42, 42, 1],
        burlywood: [222, 184, 135, 1],
        cadetblue: [95, 158, 160, 1],
        chartreuse: [127, 255, 0, 1],
        chocolate: [210, 105, 30, 1],
        coral: [255, 127, 80, 1],
        cornflowerblue: [100, 149, 237, 1],
        cornsilk: [255, 248, 220, 1],
        crimson: [220, 20, 60, 1],
        cyan: [0, 255, 255, 1],
        darkblue: [0, 0, 139, 1],
        darkcyan: [0, 139, 139, 1],
        darkgoldenrod: [184, 134, 11, 1],
        darkgray: [169, 169, 169, 1],
        darkgreen: [0, 100, 0, 1],
        darkgrey: [169, 169, 169, 1],
        darkkhaki: [189, 183, 107, 1],
        darkmagenta: [139, 0, 139, 1],
        darkolivegreen: [85, 107, 47, 1],
        darkorange: [255, 140, 0, 1],
        darkorchid: [153, 50, 204, 1],
        darkred: [139, 0, 0, 1],
        darksalmon: [233, 150, 122, 1],
        darkseagreen: [143, 188, 143, 1],
        darkslateblue: [72, 61, 139, 1],
        darkslategray: [47, 79, 79, 1],
        darkslategrey: [47, 79, 79, 1],
        darkturquoise: [0, 206, 209, 1],
        darkviolet: [148, 0, 211, 1],
        deeppink: [255, 20, 147, 1],
        deepskyblue: [0, 191, 255, 1],
        dimgray: [105, 105, 105, 1],
        dimgrey: [105, 105, 105, 1],
        dodgerblue: [30, 144, 255, 1],
        firebrick: [178, 34, 34, 1],
        floralwhite: [255, 250, 240, 1],
        forestgreen: [34, 139, 34, 1],
        fuchsia: [255, 0, 255, 1],
        gainsboro: [220, 220, 220, 1],
        ghostwhite: [248, 248, 255, 1],
        gold: [255, 215, 0, 1],
        goldenrod: [218, 165, 32, 1],
        gray: [128, 128, 128, 1],
        green: [0, 128, 0, 1],
        greenyellow: [173, 255, 47, 1],
        grey: [128, 128, 128, 1],
        honeydew: [240, 255, 240, 1],
        hotpink: [255, 105, 180, 1],
        indianred: [205, 92, 92, 1],
        indigo: [75, 0, 130, 1],
        ivory: [255, 255, 240, 1],
        khaki: [240, 230, 140, 1],
        lavender: [230, 230, 250, 1],
        lavenderblush: [255, 240, 245, 1],
        lawngreen: [124, 252, 0, 1],
        lemonchiffon: [255, 250, 205, 1],
        lightblue: [173, 216, 230, 1],
        lightcoral: [240, 128, 128, 1],
        lightcyan: [224, 255, 255, 1],
        lightgoldenrodyellow: [250, 250, 210, 1],
        lightgray: [211, 211, 211, 1],
        lightgreen: [144, 238, 144, 1],
        lightgrey: [211, 211, 211, 1],
        lightpink: [255, 182, 193, 1],
        lightsalmon: [255, 160, 122, 1],
        lightseagreen: [32, 178, 170, 1],
        lightskyblue: [135, 206, 250, 1],
        lightslategray: [119, 136, 153, 1],
        lightslategrey: [119, 136, 153, 1],
        lightsteelblue: [176, 196, 222, 1],
        lightyellow: [255, 255, 224, 1],
        lime: [0, 255, 0, 1],
        limegreen: [50, 205, 50, 1],
        linen: [250, 240, 230, 1],
        magenta: [255, 0, 255, 1],
        maroon: [128, 0, 0, 1],
        mediumaquamarine: [102, 205, 170, 1],
        mediumblue: [0, 0, 205, 1],
        mediumorchid: [186, 85, 211, 1],
        mediumpurple: [147, 112, 219, 1],
        mediumseagreen: [60, 179, 113, 1],
        mediumslateblue: [123, 104, 238, 1],
        mediumspringgreen: [0, 250, 154, 1],
        mediumturquoise: [72, 209, 204, 1],
        mediumvioletred: [199, 21, 133, 1],
        midnightblue: [25, 25, 112, 1],
        mintcream: [245, 255, 250, 1],
        mistyrose: [255, 228, 225, 1],
        moccasin: [255, 228, 181, 1],
        navajowhite: [255, 222, 173, 1],
        navy: [0, 0, 128, 1],
        oldlace: [253, 245, 230, 1],
        olive: [128, 128, 0, 1],
        olivedrab: [107, 142, 35, 1],
        orange: [255, 165, 0, 1],
        orangered: [255, 69, 0, 1],
        orchid: [218, 112, 214, 1],
        palegoldenrod: [238, 232, 170, 1],
        palegreen: [152, 251, 152, 1],
        paleturquoise: [175, 238, 238, 1],
        palevioletred: [219, 112, 147, 1],
        papayawhip: [255, 239, 213, 1],
        peachpuff: [255, 218, 185, 1],
        peru: [205, 133, 63, 1],
        pink: [255, 192, 203, 1],
        plum: [221, 160, 221, 1],
        powderblue: [176, 224, 230, 1],
        purple: [128, 0, 128, 1],
        red: [255, 0, 0, 1],
        rosybrown: [188, 143, 143, 1],
        royalblue: [65, 105, 225, 1],
        saddlebrown: [139, 69, 19, 1],
        salmon: [250, 128, 114, 1],
        sandybrown: [244, 164, 96, 1],
        seagreen: [46, 139, 87, 1],
        seashell: [255, 245, 238, 1],
        sienna: [160, 82, 45, 1],
        silver: [192, 192, 192, 1],
        skyblue: [135, 206, 235, 1],
        slateblue: [106, 90, 205, 1],
        slategray: [112, 128, 144, 1],
        slategrey: [112, 128, 144, 1],
        snow: [255, 250, 250, 1],
        springgreen: [0, 255, 127, 1],
        steelblue: [70, 130, 180, 1],
        tan: [210, 180, 140, 1],
        teal: [0, 128, 128, 1],
        thistle: [216, 191, 216, 1],
        tomato: [255, 99, 71, 1],
        turquoise: [64, 224, 208, 1],
        violet: [238, 130, 238, 1],
        wheat: [245, 222, 179, 1],
        white: [255, 255, 255, 1],
        whitesmoke: [245, 245, 245, 1],
        yellow: [255, 255, 0, 1],
        yellowgreen: [154, 205, 50, 1]
    }, Hg = new Fg(20), Wg = null, Xg = ri, Ug = ai, Yg = (Object.freeze || Object)({
        parse: Je,
        lift: ii,
        toHex: ni,
        fastLerp: ri,
        fastMapToColor: Xg,
        lerp: ai,
        mapToColor: Ug,
        modifyHSL: oi,
        modifyAlpha: si,
        stringify: li
    }), qg = Array.prototype.slice, jg = function (t, e, i, n) {
        this._tracks = {}, this._target = t, this._loop = e || !1, this._getter = i || ui, this._setter = n || hi, this._clipCount = 0, this._delay = 0, this._doneList = [], this._onframeList = [], this._clipList = []
    };
    jg.prototype = {
        when: function (t, e) {
            var i = this._tracks;
            for (var n in e) if (e.hasOwnProperty(n)) {
                if (!i[n]) {
                    i[n] = [];
                    var r = this._getter(this._target, n);
                    if (null == r) continue;
                    0 !== t && i[n].push({time: 0, value: yi(r)})
                }
                i[n].push({time: t, value: e[n]})
            }
            return this
        }, during: function (t) {
            return this._onframeList.push(t), this
        }, pause: function () {
            for (var t = 0; t < this._clipList.length; t++) this._clipList[t].pause();
            this._paused = !0
        }, resume: function () {
            for (var t = 0; t < this._clipList.length; t++) this._clipList[t].resume();
            this._paused = !1
        }, isPaused: function () {
            return !!this._paused
        }, _doneCallback: function () {
            this._tracks = {}, this._clipList.length = 0;
            for (var t = this._doneList, e = t.length, i = 0; e > i; i++) t[i].call(this)
        }, start: function (t, e) {
            var i, n = this, r = 0, a = function () {
                r--, r || n._doneCallback()
            };
            for (var o in this._tracks) if (this._tracks.hasOwnProperty(o)) {
                var s = wi(this, t, a, this._tracks[o], o, e);
                s && (this._clipList.push(s), r++, this.animation && this.animation.addClip(s), i = s)
            }
            if (i) {
                var l = i.onframe;
                i.onframe = function (t, e) {
                    l(t, e);
                    for (var i = 0; i < n._onframeList.length; i++) n._onframeList[i](t, e)
                }
            }
            return r || this._doneCallback(), this
        }, stop: function (t) {
            for (var e = this._clipList, i = this.animation, n = 0; n < e.length; n++) {
                var r = e[n];
                t && r.onframe(this._target, 1), i && i.removeClip(r)
            }
            e.length = 0
        }, delay: function (t) {
            return this._delay = t, this
        }, done: function (t) {
            return t && this._doneList.push(t), this
        }, getClips: function () {
            return this._clipList
        }
    };
    var Zg = 1;
    "undefined" != typeof window && (Zg = Math.max(window.devicePixelRatio || 1, 1));
    var Kg = 0, $g = Zg, Qg = function () {
    };
    1 === Kg && (Qg = console.error);
    var Jg = Qg, tm = function () {
        this.animators = []
    };
    tm.prototype = {
        constructor: tm, animate: function (t, e) {
            var i, n = !1, r = this, a = this.__zr;
            if (t) {
                var o = t.split("."), s = r;
                n = "shape" === o[0];
                for (var l = 0, h = o.length; h > l; l++) s && (s = s[o[l]]);
                s && (i = s)
            } else i = r;
            if (!i) return void Jg('Property "' + t + '" is not existed in element ' + r.id);
            var c = r.animators, d = new jg(i, e);
            return d.during(function () {
                r.dirty(n)
            }).done(function () {
                c.splice(u(c, d), 1)
            }), c.push(d), a && a.animation.addAnimator(d), d
        }, stopAnimation: function (t) {
            for (var e = this.animators, i = e.length, n = 0; i > n; n++) e[n].stop(t);
            return e.length = 0, this
        }, animateTo: function (t, e, i, n, r, a) {
            bi(this, t, e, i, n, r, a)
        }, animateFrom: function (t, e, i, n, r, a) {
            bi(this, t, e, i, n, r, a, !0)
        }
    };
    var em = function (t) {
        kg.call(this, t), fg.call(this, t), tm.call(this, t), this.id = t.id || Wp()
    };
    em.prototype = {
        type: "element", name: "", __zr: null, ignore: !1, clipPath: null, isGroup: !1, drift: function (t, e) {
            switch (this.draggable) {
                case"horizontal":
                    e = 0;
                    break;
                case"vertical":
                    t = 0
            }
            var i = this.transform;
            i || (i = this.transform = [1, 0, 0, 1, 0, 0]), i[4] += t, i[5] += e, this.decomposeTransform(), this.dirty(!1)
        }, beforeUpdate: function () {
        }, afterUpdate: function () {
        }, update: function () {
            this.updateTransform()
        }, traverse: function () {
        }, attrKV: function (t, e) {
            if ("position" === t || "scale" === t || "origin" === t) {
                if (e) {
                    var i = this[t];
                    i || (i = this[t] = []), i[0] = e[0], i[1] = e[1]
                }
            } else this[t] = e
        }, hide: function () {
            this.ignore = !0, this.__zr && this.__zr.refresh()
        }, show: function () {
            this.ignore = !1, this.__zr && this.__zr.refresh()
        }, attr: function (t, e) {
            if ("string" == typeof t) this.attrKV(t, e); else if (S(t)) for (var i in t) t.hasOwnProperty(i) && this.attrKV(i, t[i]);
            return this.dirty(!1), this
        }, setClipPath: function (t) {
            var e = this.__zr;
            e && t.addSelfToZr(e), this.clipPath && this.clipPath !== t && this.removeClipPath(), this.clipPath = t, t.__zr = e, t.__clipTarget = this, this.dirty(!1)
        }, removeClipPath: function () {
            var t = this.clipPath;
            t && (t.__zr && t.removeSelfFromZr(t.__zr), t.__zr = null, t.__clipTarget = null, this.clipPath = null, this.dirty(!1))
        }, addSelfToZr: function (t) {
            this.__zr = t;
            var e = this.animators;
            if (e) for (var i = 0; i < e.length; i++) t.animation.addAnimator(e[i]);
            this.clipPath && this.clipPath.addSelfToZr(t)
        }, removeSelfFromZr: function (t) {
            this.__zr = null;
            var e = this.animators;
            if (e) for (var i = 0; i < e.length; i++) t.animation.removeAnimator(e[i]);
            this.clipPath && this.clipPath.removeSelfFromZr(t)
        }
    }, c(em, tm), c(em, kg), c(em, fg);
    var im = ae, nm = Math.min, rm = Math.max;
    Ii.prototype = {
        constructor: Ii, union: function (t) {
            var e = nm(t.x, this.x), i = nm(t.y, this.y);
            this.width = rm(t.x + t.width, this.x + this.width) - e, this.height = rm(t.y + t.height, this.y + this.height) - i, this.x = e, this.y = i
        }, applyTransform: function () {
            var t = [], e = [], i = [], n = [];
            return function (r) {
                if (r) {
                    t[0] = i[0] = this.x, t[1] = n[1] = this.y, e[0] = n[0] = this.x + this.width, e[1] = i[1] = this.y + this.height, im(t, t, r), im(e, e, r), im(i, i, r), im(n, n, r), this.x = nm(t[0], e[0], i[0], n[0]), this.y = nm(t[1], e[1], i[1], n[1]);
                    var a = rm(t[0], e[0], i[0], n[0]), o = rm(t[1], e[1], i[1], n[1]);
                    this.width = a - this.x, this.height = o - this.y
                }
            }
        }(), calculateTransform: function (t) {
            var e = this, i = t.width / e.width, n = t.height / e.height, r = Le();
            return Ee(r, r, [-e.x, -e.y]), Re(r, r, [i, n]), Ee(r, r, [t.x, t.y]), r
        }, intersect: function (t) {
            if (!t) return !1;
            t instanceof Ii || (t = Ii.create(t));
            var e = this, i = e.x, n = e.x + e.width, r = e.y, a = e.y + e.height, o = t.x, s = t.x + t.width, l = t.y,
                u = t.y + t.height;
            return !(o > n || i > s || l > a || r > u)
        }, contain: function (t, e) {
            var i = this;
            return t >= i.x && t <= i.x + i.width && e >= i.y && e <= i.y + i.height
        }, clone: function () {
            return new Ii(this.x, this.y, this.width, this.height)
        }, copy: function (t) {
            this.x = t.x, this.y = t.y, this.width = t.width, this.height = t.height
        }, plain: function () {
            return {x: this.x, y: this.y, width: this.width, height: this.height}
        }
    }, Ii.create = function (t) {
        return new Ii(t.x, t.y, t.width, t.height)
    };
    var am = function (t) {
        t = t || {}, em.call(this, t);
        for (var e in t) t.hasOwnProperty(e) && (this[e] = t[e]);
        this._children = [], this.__storage = null, this.__dirty = !0
    };
    am.prototype = {
        constructor: am, isGroup: !0, type: "group", silent: !1, children: function () {
            return this._children.slice()
        }, childAt: function (t) {
            return this._children[t]
        }, childOfName: function (t) {
            for (var e = this._children, i = 0; i < e.length; i++) if (e[i].name === t) return e[i]
        }, childCount: function () {
            return this._children.length
        }, add: function (t) {
            return t && t !== this && t.parent !== this && (this._children.push(t), this._doAdd(t)), this
        }, addBefore: function (t, e) {
            if (t && t !== this && t.parent !== this && e && e.parent === this) {
                var i = this._children, n = i.indexOf(e);
                n >= 0 && (i.splice(n, 0, t), this._doAdd(t))
            }
            return this
        }, _doAdd: function (t) {
            t.parent && t.parent.remove(t), t.parent = this;
            var e = this.__storage, i = this.__zr;
            e && e !== t.__storage && (e.addToStorage(t), t instanceof am && t.addChildrenToStorage(e)), i && i.refresh()
        }, remove: function (t) {
            var e = this.__zr, i = this.__storage, n = this._children, r = u(n, t);
            return 0 > r ? this : (n.splice(r, 1), t.parent = null, i && (i.delFromStorage(t), t instanceof am && t.delChildrenFromStorage(i)), e && e.refresh(), this)
        }, removeAll: function () {
            var t, e, i = this._children, n = this.__storage;
            for (e = 0; e < i.length; e++) t = i[e], n && (n.delFromStorage(t), t instanceof am && t.delChildrenFromStorage(n)), t.parent = null;
            return i.length = 0, this
        }, eachChild: function (t, e) {
            for (var i = this._children, n = 0; n < i.length; n++) {
                var r = i[n];
                t.call(e, r, n)
            }
            return this
        }, traverse: function (t, e) {
            for (var i = 0; i < this._children.length; i++) {
                var n = this._children[i];
                t.call(e, n), "group" === n.type && n.traverse(t, e)
            }
            return this
        }, addChildrenToStorage: function (t) {
            for (var e = 0; e < this._children.length; e++) {
                var i = this._children[e];
                t.addToStorage(i), i instanceof am && i.addChildrenToStorage(t)
            }
        }, delChildrenFromStorage: function (t) {
            for (var e = 0; e < this._children.length; e++) {
                var i = this._children[e];
                t.delFromStorage(i), i instanceof am && i.delChildrenFromStorage(t)
            }
        }, dirty: function () {
            return this.__dirty = !0, this.__zr && this.__zr.refresh(), this
        }, getBoundingRect: function (t) {
            for (var e = null, i = new Ii(0, 0, 0, 0), n = t || this._children, r = [], a = 0; a < n.length; a++) {
                var o = n[a];
                if (!o.ignore && !o.invisible) {
                    var s = o.getBoundingRect(), l = o.getLocalTransform(r);
                    l ? (i.copy(s), i.applyTransform(l), e = e || i.clone(), e.union(i)) : (e = e || s.clone(), e.union(s))
                }
            }
            return e || i
        }
    }, h(am, em);
    var om = 32, sm = 7, lm = function () {
        this._roots = [], this._displayList = [], this._displayListLen = 0
    };
    lm.prototype = {
        constructor: lm, traverse: function (t, e) {
            for (var i = 0; i < this._roots.length; i++) this._roots[i].traverse(t, e)
        }, getDisplayList: function (t, e) {
            return e = e || !1, t && this.updateDisplayList(e), this._displayList
        }, updateDisplayList: function (t) {
            this._displayListLen = 0;
            for (var e = this._roots, i = this._displayList, n = 0, r = e.length; r > n; n++) this._updateAndAddDisplayable(e[n], null, t);
            i.length = this._displayListLen, Up.canvasSupported && Oi(i, zi)
        }, _updateAndAddDisplayable: function (t, e, i) {
            if (!t.ignore || i) {
                t.beforeUpdate(), t.__dirty && t.update(), t.afterUpdate();
                var n = t.clipPath;
                if (n) {
                    e = e ? e.slice() : [];
                    for (var r = n, a = t; r;) r.parent = a, r.updateTransform(), e.push(r), a = r, r = r.clipPath
                }
                if (t.isGroup) {
                    for (var o = t._children, s = 0; s < o.length; s++) {
                        var l = o[s];
                        t.__dirty && (l.__dirty = !0), this._updateAndAddDisplayable(l, e, i)
                    }
                    t.__dirty = !1
                } else t.__clipPaths = e, this._displayList[this._displayListLen++] = t
            }
        }, addRoot: function (t) {
            t.__storage !== this && (t instanceof am && t.addChildrenToStorage(this), this.addToStorage(t), this._roots.push(t))
        }, delRoot: function (t) {
            if (null == t) {
                for (var e = 0; e < this._roots.length; e++) {
                    var i = this._roots[e];
                    i instanceof am && i.delChildrenFromStorage(this)
                }
                return this._roots = [], this._displayList = [], void (this._displayListLen = 0)
            }
            if (t instanceof Array) for (var e = 0, n = t.length; n > e; e++) this.delRoot(t[e]); else {
                var r = u(this._roots, t);
                r >= 0 && (this.delFromStorage(t), this._roots.splice(r, 1), t instanceof am && t.delChildrenFromStorage(this))
            }
        }, addToStorage: function (t) {
            return t && (t.__storage = this, t.dirty(!1)), this
        }, delFromStorage: function (t) {
            return t && (t.__storage = null), this
        }, dispose: function () {
            this._renderList = this._roots = null
        }, displayableSortFunc: zi
    };
    var um = {
            shadowBlur: 1,
            shadowOffsetX: 1,
            shadowOffsetY: 1,
            textShadowBlur: 1,
            textShadowOffsetX: 1,
            textShadowOffsetY: 1,
            textBoxShadowBlur: 1,
            textBoxShadowOffsetX: 1,
            textBoxShadowOffsetY: 1
        }, hm = function (t, e, i) {
            return um.hasOwnProperty(e) ? i *= t.dpr : i
        }, cm = {NONE: 0, STYLE_BIND: 1, PLAIN_TEXT: 2}, dm = 9,
        fm = [["shadowBlur", 0], ["shadowOffsetX", 0], ["shadowOffsetY", 0], ["shadowColor", "#000"], ["lineCap", "butt"], ["lineJoin", "miter"], ["miterLimit", 10]],
        pm = function (t) {
            this.extendFrom(t, !1)
        };
    pm.prototype = {
        constructor: pm,
        fill: "#000",
        stroke: null,
        opacity: 1,
        fillOpacity: null,
        strokeOpacity: null,
        lineDash: null,
        lineDashOffset: 0,
        shadowBlur: 0,
        shadowOffsetX: 0,
        shadowOffsetY: 0,
        lineWidth: 1,
        strokeNoScale: !1,
        text: null,
        font: null,
        textFont: null,
        fontStyle: null,
        fontWeight: null,
        fontSize: null,
        fontFamily: null,
        textTag: null,
        textFill: "#000",
        textStroke: null,
        textWidth: null,
        textHeight: null,
        textStrokeWidth: 0,
        textLineHeight: null,
        textPosition: "inside",
        textRect: null,
        textOffset: null,
        textAlign: null,
        textVerticalAlign: null,
        textDistance: 5,
        textShadowColor: "transparent",
        textShadowBlur: 0,
        textShadowOffsetX: 0,
        textShadowOffsetY: 0,
        textBoxShadowColor: "transparent",
        textBoxShadowBlur: 0,
        textBoxShadowOffsetX: 0,
        textBoxShadowOffsetY: 0,
        transformText: !1,
        textRotation: 0,
        textOrigin: null,
        textBackgroundColor: null,
        textBorderColor: null,
        textBorderWidth: 0,
        textBorderRadius: 0,
        textPadding: null,
        rich: null,
        truncate: null,
        blend: null,
        bind: function (t, e, i) {
            var n = this, r = i && i.style, a = !r || t.__attrCachedBy !== cm.STYLE_BIND;
            t.__attrCachedBy = cm.STYLE_BIND;
            for (var o = 0; o < fm.length; o++) {
                var s = fm[o], l = s[0];
                (a || n[l] !== r[l]) && (t[l] = hm(t, l, n[l] || s[1]))
            }
            if ((a || n.fill !== r.fill) && (t.fillStyle = n.fill), (a || n.stroke !== r.stroke) && (t.strokeStyle = n.stroke), (a || n.opacity !== r.opacity) && (t.globalAlpha = null == n.opacity ? 1 : n.opacity), (a || n.blend !== r.blend) && (t.globalCompositeOperation = n.blend || "source-over"), this.hasStroke()) {
                var u = n.lineWidth;
                t.lineWidth = u / (this.strokeNoScale && e && e.getLineScale ? e.getLineScale() : 1)
            }
        },
        hasFill: function () {
            var t = this.fill;
            return null != t && "none" !== t
        },
        hasStroke: function () {
            var t = this.stroke;
            return null != t && "none" !== t && this.lineWidth > 0
        },
        extendFrom: function (t, e) {
            if (t) for (var i in t) !t.hasOwnProperty(i) || e !== !0 && (e === !1 ? this.hasOwnProperty(i) : null == t[i]) || (this[i] = t[i])
        },
        set: function (t, e) {
            "string" == typeof t ? this[t] = e : this.extendFrom(t, !0)
        },
        clone: function () {
            var t = new this.constructor;
            return t.extendFrom(this, !0), t
        },
        getGradient: function (t, e, i) {
            for (var n = "radial" === e.type ? Ei : Bi, r = n(t, e, i), a = e.colorStops, o = 0; o < a.length; o++) r.addColorStop(a[o].offset, a[o].color);
            return r
        }
    };
    for (var gm = pm.prototype, mm = 0; mm < fm.length; mm++) {
        var vm = fm[mm];
        vm[0] in gm || (gm[vm[0]] = vm[1])
    }
    pm.getGradient = gm.getGradient;
    var ym = function (t, e) {
        this.image = t, this.repeat = e, this.type = "pattern"
    };
    ym.prototype.getCanvasPattern = function (t) {
        return t.createPattern(this.image, this.repeat || "repeat")
    };
    var xm = function (t, e, i) {
        var n;
        i = i || $g, "string" == typeof t ? n = Ri(t, e, i) : S(t) && (n = t, t = n.id), this.id = t, this.dom = n;
        var r = n.style;
        r && (n.onselectstart = Ni, r["-webkit-user-select"] = "none", r["user-select"] = "none", r["-webkit-touch-callout"] = "none", r["-webkit-tap-highlight-color"] = "rgba(0,0,0,0)", r.padding = 0, r.margin = 0, r["border-width"] = 0), this.domBack = null, this.ctxBack = null, this.painter = e, this.config = null, this.clearColor = 0, this.motionBlur = !1, this.lastFrameAlpha = .7, this.dpr = i
    };
    xm.prototype = {
        constructor: xm,
        __dirty: !0,
        __used: !1,
        __drawIndex: 0,
        __startIndex: 0,
        __endIndex: 0,
        incremental: !1,
        getElementCount: function () {
            return this.__endIndex - this.__startIndex
        },
        initContext: function () {
            this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr
        },
        createBackBuffer: function () {
            var t = this.dpr;
            this.domBack = Ri("back-" + this.id, this.painter, t), this.ctxBack = this.domBack.getContext("2d"), 1 !== t && this.ctxBack.scale(t, t)
        },
        resize: function (t, e) {
            var i = this.dpr, n = this.dom, r = n.style, a = this.domBack;
            r && (r.width = t + "px", r.height = e + "px"), n.width = t * i, n.height = e * i, a && (a.width = t * i, a.height = e * i, 1 !== i && this.ctxBack.scale(i, i))
        },
        clear: function (t, e) {
            var i = this.dom, n = this.ctx, r = i.width, a = i.height, e = e || this.clearColor,
                o = this.motionBlur && !t, s = this.lastFrameAlpha, l = this.dpr;
            if (o && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(i, 0, 0, r / l, a / l)), n.clearRect(0, 0, r, a), e && "transparent" !== e) {
                var u;
                e.colorStops ? (u = e.__canvasGradient || pm.getGradient(n, e, {
                    x: 0,
                    y: 0,
                    width: r,
                    height: a
                }), e.__canvasGradient = u) : e.image && (u = ym.prototype.getCanvasPattern.call(e, n)), n.save(), n.fillStyle = u || e, n.fillRect(0, 0, r, a), n.restore()
            }
            if (o) {
                var h = this.domBack;
                n.save(), n.globalAlpha = s, n.drawImage(h, 0, 0, r, a), n.restore()
            }
        }
    };
    var _m = "undefined" != typeof window && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function (t) {
            setTimeout(t, 16)
        }, wm = new Fg(50), bm = {}, Sm = 0, Mm = 5e3, Im = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g, Cm = "12px sans-serif",
        Tm = {};
    Tm.measureText = function (t, e) {
        var i = l();
        return i.font = e || Cm, i.measureText(t)
    };
    var Dm = Cm, Am = {left: 1, right: 1, center: 1}, km = {top: 1, bottom: 1, middle: 1},
        Pm = [["textShadowBlur", "shadowBlur", 0], ["textShadowOffsetX", "shadowOffsetX", 0], ["textShadowOffsetY", "shadowOffsetY", 0], ["textShadowColor", "shadowColor", "transparent"]],
        Lm = {}, Om = {}, zm = new Ii, Bm = function () {
        };
    Bm.prototype = {
        constructor: Bm, drawRectText: function (t, e) {
            var i = this.style;
            e = i.textRect || e, this.__dirty && ln(i, !0);
            var n = i.text;
            if (null != n && (n += ""), In(n, i)) {
                t.save();
                var r = this.transform;
                i.transformText ? this.setTransform(t) : r && (zm.copy(e), zm.applyTransform(r), e = zm), hn(this, t, n, i, e, dm), t.restore()
            }
        }
    }, Cn.prototype = {
        constructor: Cn,
        type: "displayable",
        __dirty: !0,
        invisible: !1,
        z: 0,
        z2: 0,
        zlevel: 0,
        draggable: !1,
        dragging: !1,
        silent: !1,
        culling: !1,
        cursor: "pointer",
        rectHover: !1,
        progressive: !1,
        incremental: !1,
        globalScaleRatio: 1,
        beforeBrush: function () {
        },
        afterBrush: function () {
        },
        brush: function () {
        },
        getBoundingRect: function () {
        },
        contain: function (t, e) {
            return this.rectContain(t, e)
        },
        traverse: function (t, e) {
            t.call(e, this)
        },
        rectContain: function (t, e) {
            var i = this.transformCoordToLocal(t, e), n = this.getBoundingRect();
            return n.contain(i[0], i[1])
        },
        dirty: function () {
            this.__dirty = this.__dirtyText = !0, this._rect = null, this.__zr && this.__zr.refresh()
        },
        animateStyle: function (t) {
            return this.animate("style", t)
        },
        attrKV: function (t, e) {
            "style" !== t ? em.prototype.attrKV.call(this, t, e) : this.style.set(e)
        },
        setStyle: function (t, e) {
            return this.style.set(t, e), this.dirty(!1), this
        },
        useStyle: function (t) {
            return this.style = new pm(t, this), this.dirty(!1), this
        },
        calculateTextPosition: null
    }, h(Cn, em), c(Cn, Bm), Tn.prototype = {
        constructor: Tn, type: "image", brush: function (t, e) {
            var i = this.style, n = i.image;
            i.bind(t, this, e);
            var r = this._image = Vi(n, this._image, this, this.onload);
            if (r && Hi(r)) {
                var a = i.x || 0, o = i.y || 0, s = i.width, l = i.height, u = r.width / r.height;
                if (null == s && null != l ? s = l * u : null == l && null != s ? l = s / u : null == s && null == l && (s = r.width, l = r.height), this.setTransform(t), i.sWidth && i.sHeight) {
                    var h = i.sx || 0, c = i.sy || 0;
                    t.drawImage(r, h, c, i.sWidth, i.sHeight, a, o, s, l)
                } else if (i.sx && i.sy) {
                    var h = i.sx, c = i.sy, d = s - h, f = l - c;
                    t.drawImage(r, h, c, d, f, a, o, s, l)
                } else t.drawImage(r, a, o, s, l);
                null != i.text && (this.restoreTransform(t), this.drawRectText(t, this.getBoundingRect()))
            }
        }, getBoundingRect: function () {
            var t = this.style;
            return this._rect || (this._rect = new Ii(t.x || 0, t.y || 0, t.width || 0, t.height || 0)), this._rect
        }
    }, h(Tn, Cn);
    var Em = 1e5, Nm = 314159, Rm = .01, Fm = .001, Vm = new Ii(0, 0, 0, 0), Gm = new Ii(0, 0, 0, 0),
        Hm = function (t, e, i) {
            this.type = "canvas";
            var n = !t.nodeName || "CANVAS" === t.nodeName.toUpperCase();
            this._opts = i = o({}, i || {}), this.dpr = i.devicePixelRatio || $g, this._singleCanvas = n, this.root = t;
            var r = t.style;
            r && (r["-webkit-tap-highlight-color"] = "transparent", r["-webkit-user-select"] = r["user-select"] = r["-webkit-touch-callout"] = "none", t.innerHTML = ""), this.storage = e;
            var a = this._zlevelList = [], s = this._layers = {};
            if (this._layerConfig = {}, this._needsManuallyCompositing = !1, n) {
                var l = t.width, u = t.height;
                null != i.width && (l = i.width), null != i.height && (u = i.height), this.dpr = i.devicePixelRatio || 1, t.width = l * this.dpr, t.height = u * this.dpr, this._width = l, this._height = u;
                var h = new xm(t, this, this.dpr);
                h.__builtin__ = !0, h.initContext(), s[Nm] = h, h.zlevel = Nm, a.push(Nm), this._domRoot = t
            } else {
                this._width = this._getSize(0), this._height = this._getSize(1);
                var c = this._domRoot = On(this._width, this._height);
                t.appendChild(c)
            }
            this._hoverlayer = null, this._hoverElements = []
        };
    Hm.prototype = {
        constructor: Hm, getType: function () {
            return "canvas"
        }, isSingleCanvas: function () {
            return this._singleCanvas
        }, getViewportRoot: function () {
            return this._domRoot
        }, getViewportRootOffset: function () {
            var t = this.getViewportRoot();
            return t ? {offsetLeft: t.offsetLeft || 0, offsetTop: t.offsetTop || 0} : void 0
        }, refresh: function (t) {
            var e = this.storage.getDisplayList(!0), i = this._zlevelList;
            this._redrawId = Math.random(), this._paintList(e, t, this._redrawId);
            for (var n = 0; n < i.length; n++) {
                var r = i[n], a = this._layers[r];
                if (!a.__builtin__ && a.refresh) {
                    var o = 0 === n ? this._backgroundColor : null;
                    a.refresh(o)
                }
            }
            return this.refreshHover(), this
        }, addHover: function (t, e) {
            if (!t.__hoverMir) {
                var i = new t.constructor({style: t.style, shape: t.shape, z: t.z, z2: t.z2, silent: t.silent});
                return i.__from = t, t.__hoverMir = i, e && i.setStyle(e), this._hoverElements.push(i), i
            }
        }, removeHover: function (t) {
            var e = t.__hoverMir, i = this._hoverElements, n = u(i, e);
            n >= 0 && i.splice(n, 1), t.__hoverMir = null
        }, clearHover: function () {
            for (var t = this._hoverElements, e = 0; e < t.length; e++) {
                var i = t[e].__from;
                i && (i.__hoverMir = null)
            }
            t.length = 0
        }, refreshHover: function () {
            var t = this._hoverElements, e = t.length, i = this._hoverlayer;
            if (i && i.clear(), e) {
                Oi(t, this.storage.displayableSortFunc), i || (i = this._hoverlayer = this.getLayer(Em));
                var n = {};
                i.ctx.save();
                for (var r = 0; e > r;) {
                    var a = t[r], o = a.__from;
                    o && o.__zr ? (r++, o.invisible || (a.transform = o.transform, a.invTransform = o.invTransform, a.__clipPaths = o.__clipPaths, this._doPaintEl(a, i, !0, n))) : (t.splice(r, 1), o.__hoverMir = null, e--)
                }
                i.ctx.restore()
            }
        }, getHoverLayer: function () {
            return this.getLayer(Em)
        }, _paintList: function (t, e, i) {
            if (this._redrawId === i) {
                e = e || !1, this._updateLayerStatus(t);
                var n = this._doPaintList(t, e);
                if (this._needsManuallyCompositing && this._compositeManually(), !n) {
                    var r = this;
                    _m(function () {
                        r._paintList(t, e, i)
                    })
                }
            }
        }, _compositeManually: function () {
            var t = this.getLayer(Nm).ctx, e = this._domRoot.width, i = this._domRoot.height;
            t.clearRect(0, 0, e, i), this.eachBuiltinLayer(function (n) {
                n.virtual && t.drawImage(n.dom, 0, 0, e, i)
            })
        }, _doPaintList: function (t, e) {
            for (var i = [], n = 0; n < this._zlevelList.length; n++) {
                var r = this._zlevelList[n], a = this._layers[r];
                a.__builtin__ && a !== this._hoverlayer && (a.__dirty || e) && i.push(a)
            }
            for (var o = !0, s = 0; s < i.length; s++) {
                var a = i[s], l = a.ctx, u = {};
                l.save();
                var h = e ? a.__startIndex : a.__drawIndex, c = !e && a.incremental && Date.now, d = c && Date.now(),
                    p = a.zlevel === this._zlevelList[0] ? this._backgroundColor : null;
                if (a.__startIndex === a.__endIndex) a.clear(!1, p); else if (h === a.__startIndex) {
                    var g = t[h];
                    g.incremental && g.notClear && !e || a.clear(!1, p)
                }
                -1 === h && (console.error("For some unknown reason. drawIndex is -1"), h = a.__startIndex);
                for (var m = h; m < a.__endIndex; m++) {
                    var v = t[m];
                    if (this._doPaintEl(v, a, e, u), v.__dirty = v.__dirtyText = !1, c) {
                        var y = Date.now() - d;
                        if (y > 15) break
                    }
                }
                a.__drawIndex = m, a.__drawIndex < a.__endIndex && (o = !1), u.prevElClipPaths && l.restore(), l.restore()
            }
            return Up.wxa && f(this._layers, function (t) {
                t && t.ctx && t.ctx.draw && t.ctx.draw()
            }), o
        }, _doPaintEl: function (t, e, i, n) {
            var r = e.ctx, a = t.transform;
            if (!(!e.__dirty && !i || t.invisible || 0 === t.style.opacity || a && !a[0] && !a[3] || t.culling && kn(t, this._width, this._height))) {
                var o = t.__clipPaths, s = n.prevElClipPaths;
                (!s || Pn(o, s)) && (s && (r.restore(), n.prevElClipPaths = null, n.prevEl = null), o && (r.save(), Ln(o, r), n.prevElClipPaths = o)), t.beforeBrush && t.beforeBrush(r), t.brush(r, n.prevEl || null), n.prevEl = t, t.afterBrush && t.afterBrush(r)
            }
        }, getLayer: function (t, e) {
            this._singleCanvas && !this._needsManuallyCompositing && (t = Nm);
            var i = this._layers[t];
            return i || (i = new xm("zr_" + t, this, this.dpr), i.zlevel = t, i.__builtin__ = !0, this._layerConfig[t] ? r(i, this._layerConfig[t], !0) : this._layerConfig[t - Rm] && r(i, this._layerConfig[t - Rm], !0), e && (i.virtual = e), this.insertLayer(t, i), i.initContext()), i
        }, insertLayer: function (t, e) {
            var i = this._layers, n = this._zlevelList, r = n.length, a = null, o = -1, s = this._domRoot;
            if (i[t]) return void Jg("ZLevel " + t + " has been used already");
            if (!An(e)) return void Jg("Layer of zlevel " + t + " is not valid");
            if (r > 0 && t > n[0]) {
                for (o = 0; r - 1 > o && !(n[o] < t && n[o + 1] > t); o++) ;
                a = i[n[o]]
            }
            if (n.splice(o + 1, 0, t), i[t] = e, !e.virtual) if (a) {
                var l = a.dom;
                l.nextSibling ? s.insertBefore(e.dom, l.nextSibling) : s.appendChild(e.dom)
            } else s.firstChild ? s.insertBefore(e.dom, s.firstChild) : s.appendChild(e.dom)
        }, eachLayer: function (t, e) {
            var i, n, r = this._zlevelList;
            for (n = 0; n < r.length; n++) i = r[n], t.call(e, this._layers[i], i)
        }, eachBuiltinLayer: function (t, e) {
            var i, n, r, a = this._zlevelList;
            for (r = 0; r < a.length; r++) n = a[r], i = this._layers[n], i.__builtin__ && t.call(e, i, n)
        }, eachOtherLayer: function (t, e) {
            var i, n, r, a = this._zlevelList;
            for (r = 0; r < a.length; r++) n = a[r], i = this._layers[n], i.__builtin__ || t.call(e, i, n)
        }, getLayers: function () {
            return this._layers
        }, _updateLayerStatus: function (t) {
            function e(t) {
                a && (a.__endIndex !== t && (a.__dirty = !0), a.__endIndex = t)
            }

            if (this.eachBuiltinLayer(function (t) {
                t.__dirty = t.__used = !1
            }), this._singleCanvas) for (var i = 1; i < t.length; i++) {
                var n = t[i];
                if (n.zlevel !== t[i - 1].zlevel || n.incremental) {
                    this._needsManuallyCompositing = !0;
                    break
                }
            }
            for (var r, a = null, o = 0, i = 0; i < t.length; i++) {
                var s, n = t[i], l = n.zlevel;
                r !== l && (r = l, o = 0), n.incremental ? (s = this.getLayer(l + Fm, this._needsManuallyCompositing), s.incremental = !0, o = 1) : s = this.getLayer(l + (o > 0 ? Rm : 0), this._needsManuallyCompositing), s.__builtin__ || Jg("ZLevel " + l + " has been used by unkown layer " + s.id), s !== a && (s.__used = !0, s.__startIndex !== i && (s.__dirty = !0), s.__startIndex = i, s.__drawIndex = s.incremental ? -1 : i, e(i), a = s), n.__dirty && (s.__dirty = !0, s.incremental && s.__drawIndex < 0 && (s.__drawIndex = i))
            }
            e(i), this.eachBuiltinLayer(function (t) {
                !t.__used && t.getElementCount() > 0 && (t.__dirty = !0, t.__startIndex = t.__endIndex = t.__drawIndex = 0), t.__dirty && t.__drawIndex < 0 && (t.__drawIndex = t.__startIndex)
            })
        }, clear: function () {
            return this.eachBuiltinLayer(this._clearLayer), this
        }, _clearLayer: function (t) {
            t.clear()
        }, setBackgroundColor: function (t) {
            this._backgroundColor = t
        }, configLayer: function (t, e) {
            if (e) {
                var i = this._layerConfig;
                i[t] ? r(i[t], e, !0) : i[t] = e;
                for (var n = 0; n < this._zlevelList.length; n++) {
                    var a = this._zlevelList[n];
                    if (a === t || a === t + Rm) {
                        var o = this._layers[a];
                        r(o, i[t], !0)
                    }
                }
            }
        }, delLayer: function (t) {
            var e = this._layers, i = this._zlevelList, n = e[t];
            n && (n.dom.parentNode.removeChild(n.dom), delete e[t], i.splice(u(i, t), 1))
        }, resize: function (t, e) {
            if (this._domRoot.style) {
                var i = this._domRoot;
                i.style.display = "none";
                var n = this._opts;
                if (null != t && (n.width = t), null != e && (n.height = e), t = this._getSize(0), e = this._getSize(1), i.style.display = "", this._width !== t || e !== this._height) {
                    i.style.width = t + "px", i.style.height = e + "px";
                    for (var r in this._layers) this._layers.hasOwnProperty(r) && this._layers[r].resize(t, e);
                    f(this._progressiveLayers, function (i) {
                        i.resize(t, e)
                    }), this.refresh(!0)
                }
                this._width = t, this._height = e
            } else {
                if (null == t || null == e) return;
                this._width = t, this._height = e, this.getLayer(Nm).resize(t, e)
            }
            return this
        }, clearLayer: function (t) {
            var e = this._layers[t];
            e && e.clear()
        }, dispose: function () {
            this.root.innerHTML = "", this.root = this.storage = this._domRoot = this._layers = null
        }, getRenderedCanvas: function (t) {
            if (t = t || {}, this._singleCanvas && !this._compositeManually) return this._layers[Nm].dom;
            var e = new xm("image", this, t.pixelRatio || this.dpr);
            if (e.initContext(), e.clear(!1, t.backgroundColor || this._backgroundColor), t.pixelRatio <= this.dpr) {
                this.refresh();
                var i = e.dom.width, n = e.dom.height, r = e.ctx;
                this.eachLayer(function (t) {
                    t.__builtin__ ? r.drawImage(t.dom, 0, 0, i, n) : t.renderToCanvas && (e.ctx.save(), t.renderToCanvas(e.ctx), e.ctx.restore())
                })
            } else for (var a = {}, o = this.storage.getDisplayList(!0), s = 0; s < o.length; s++) {
                var l = o[s];
                this._doPaintEl(l, e, !0, a)
            }
            return e.dom
        }, getWidth: function () {
            return this._width
        }, getHeight: function () {
            return this._height
        }, _getSize: function (t) {
            var e = this._opts, i = ["width", "height"][t], n = ["clientWidth", "clientHeight"][t],
                r = ["paddingLeft", "paddingTop"][t], a = ["paddingRight", "paddingBottom"][t];
            if (null != e[i] && "auto" !== e[i]) return parseFloat(e[i]);
            var o = this.root, s = document.defaultView.getComputedStyle(o);
            return (o[n] || Dn(s[i]) || Dn(o.style[i])) - (Dn(s[r]) || 0) - (Dn(s[a]) || 0) | 0
        }, pathToImage: function (t, e) {
            e = e || this.dpr;
            var i = document.createElement("canvas"), n = i.getContext("2d"), r = t.getBoundingRect(), a = t.style,
                o = a.shadowBlur * e, s = a.shadowOffsetX * e, l = a.shadowOffsetY * e,
                u = a.hasStroke() ? a.lineWidth : 0, h = Math.max(u / 2, -s + o), c = Math.max(u / 2, s + o),
                d = Math.max(u / 2, -l + o), f = Math.max(u / 2, l + o), p = r.width + h + c, g = r.height + d + f;
            i.width = p * e, i.height = g * e, n.scale(e, e), n.clearRect(0, 0, p, g), n.dpr = e;
            var m = {position: t.position, rotation: t.rotation, scale: t.scale};
            t.position = [h - r.x, d - r.y], t.rotation = 0, t.scale = [1, 1], t.updateTransform(), t && t.brush(n);
            var v = Tn, y = new v({style: {x: 0, y: 0, image: i}});
            return null != m.position && (y.position = t.position = m.position), null != m.rotation && (y.rotation = t.rotation = m.rotation), null != m.scale && (y.scale = t.scale = m.scale), y
        }
    };
    var Wm = function (t) {
        t = t || {}, this.stage = t.stage || {}, this.onframe = t.onframe || function () {
        }, this._clips = [], this._running = !1, this._time, this._pausedTime, this._pauseStart, this._paused = !1, fg.call(this)
    };
    Wm.prototype = {
        constructor: Wm, addClip: function (t) {
            this._clips.push(t)
        }, addAnimator: function (t) {
            t.animation = this;
            for (var e = t.getClips(), i = 0; i < e.length; i++) this.addClip(e[i])
        }, removeClip: function (t) {
            var e = u(this._clips, t);
            e >= 0 && this._clips.splice(e, 1)
        }, removeAnimator: function (t) {
            for (var e = t.getClips(), i = 0; i < e.length; i++) this.removeClip(e[i]);
            t.animation = null
        }, _update: function () {
            for (var t = (new Date).getTime() - this._pausedTime, e = t - this._time, i = this._clips, n = i.length, r = [], a = [], o = 0; n > o; o++) {
                var s = i[o], l = s.step(t, e);
                l && (r.push(l), a.push(s))
            }
            for (var o = 0; n > o;) i[o]._needsRemove ? (i[o] = i[n - 1], i.pop(), n--) : o++;
            n = r.length;
            for (var o = 0; n > o; o++) a[o].fire(r[o]);
            this._time = t, this.onframe(e), this.trigger("frame", e), this.stage.update && this.stage.update()
        }, _startLoop: function () {
            function t() {
                e._running && (_m(t), !e._paused && e._update())
            }

            var e = this;
            this._running = !0, _m(t)
        }, start: function () {
            this._time = (new Date).getTime(), this._pausedTime = 0, this._startLoop()
        }, stop: function () {
            this._running = !1
        }, pause: function () {
            this._paused || (this._pauseStart = (new Date).getTime(), this._paused = !0)
        }, resume: function () {
            this._paused && (this._pausedTime += (new Date).getTime() - this._pauseStart, this._paused = !1)
        }, clear: function () {
            this._clips = []
        }, isFinished: function () {
            return !this._clips.length
        }, animate: function (t, e) {
            e = e || {};
            var i = new jg(t, e.loop, e.getter, e.setter);
            return this.addAnimator(i), i
        }
    }, c(Wm, fg);
    var Xm = 300, Um = Up.domSupported, Ym = function () {
        var t = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"],
            e = ["touchstart", "touchend", "touchmove"],
            i = {pointerdown: 1, pointerup: 1, pointermove: 1, pointerout: 1}, n = p(t, function (t) {
                var e = t.replace("mouse", "pointer");
                return i.hasOwnProperty(e) ? e : t
            });
        return {mouse: t, touch: e, pointer: n}
    }(), qm = {mouse: ["mousemove", "mouseup"], pointer: ["pointermove", "pointerup"]}, jm = Vn.prototype;
    jm.stopPropagation = jm.stopImmediatePropagation = jm.preventDefault = V;
    var Zm = {
        mousedown: function (t) {
            t = be(this.dom, t), this._mayPointerCapture = [t.zrX, t.zrY], this.trigger("mousedown", t)
        }, mousemove: function (t) {
            t = be(this.dom, t);
            var e = this._mayPointerCapture;
            !e || t.zrX === e[0] && t.zrY === e[1] || Un(this, !0), this.trigger("mousemove", t)
        }, mouseup: function (t) {
            t = be(this.dom, t), Un(this, !1), this.trigger("mouseup", t)
        }, mouseout: function (t) {
            t = be(this.dom, t), this._pointerCapturing && (t.zrEventControl = "no_globalout");
            var e = t.toElement || t.relatedTarget;
            t.zrIsToLocalDOM = Fn(this, e), this.trigger("mouseout", t)
        }, touchstart: function (t) {
            t = be(this.dom, t), Nn(t), this._lastTouchMoment = new Date, this.handler.processGesture(t, "start"), Zm.mousemove.call(this, t), Zm.mousedown.call(this, t)
        }, touchmove: function (t) {
            t = be(this.dom, t), Nn(t), this.handler.processGesture(t, "change"), Zm.mousemove.call(this, t)
        }, touchend: function (t) {
            t = be(this.dom, t), Nn(t), this.handler.processGesture(t, "end"), Zm.mouseup.call(this, t), +new Date - this._lastTouchMoment < Xm && Zm.click.call(this, t)
        }, pointerdown: function (t) {
            Zm.mousedown.call(this, t)
        }, pointermove: function (t) {
            Bn(t) || Zm.mousemove.call(this, t)
        }, pointerup: function (t) {
            Zm.mouseup.call(this, t)
        }, pointerout: function (t) {
            Bn(t) || Zm.mouseout.call(this, t)
        }
    };
    f(["click", "mousewheel", "dblclick", "contextmenu"], function (t) {
        Zm[t] = function (e) {
            e = be(this.dom, e), this.trigger(t, e)
        }
    });
    var Km = {
        pointermove: function (t) {
            Bn(t) || Km.mousemove.call(this, t)
        }, pointerup: function (t) {
            Km.mouseup.call(this, t)
        }, mousemove: function (t) {
            this.trigger("mousemove", t)
        }, mouseup: function (t) {
            var e = this._pointerCapturing;
            Un(this, !1), this.trigger("mouseup", t), e && (t.zrEventControl = "only_globalout", this.trigger("mouseout", t))
        }
    }, $m = qn.prototype;
    $m.dispose = function () {
        Xn(this._localHandlerScope), Um && Xn(this._globalHandlerScope)
    }, $m.setCursor = function (t) {
        this.dom.style && (this.dom.style.cursor = t || "default")
    }, c(qn, fg);
    var Qm = !Up.canvasSupported, Jm = {canvas: Hm}, tv = {}, ev = "4.3.2", iv = function (t, e, i) {
        i = i || {}, this.dom = e, this.id = t;
        var n = this, r = new lm, a = i.renderer;
        if (Qm) {
            if (!Jm.vml) throw new Error("You need to require 'zrender/vml/vml' to support IE8");
            a = "vml"
        } else a && Jm[a] || (a = "canvas");
        var o = new Jm[a](e, r, i, t);
        this.storage = r, this.painter = o;
        var s = Up.node || Up.worker ? null : new qn(o.getViewportRoot(), o.root);
        this.handler = new Ig(r, o, s, o.root), this.animation = new Wm({stage: {update: y(this.flush, this)}}), this.animation.start(), this._needsRefresh;
        var l = r.delFromStorage, u = r.addToStorage;
        r.delFromStorage = function (t) {
            l.call(r, t), t && t.removeSelfFromZr(n)
        }, r.addToStorage = function (t) {
            u.call(r, t), t.addSelfToZr(n)
        }
    };
    iv.prototype = {
        constructor: iv, getId: function () {
            return this.id
        }, add: function (t) {
            this.storage.addRoot(t), this._needsRefresh = !0
        }, remove: function (t) {
            this.storage.delRoot(t), this._needsRefresh = !0
        }, configLayer: function (t, e) {
            this.painter.configLayer && this.painter.configLayer(t, e), this._needsRefresh = !0
        }, setBackgroundColor: function (t) {
            this.painter.setBackgroundColor && this.painter.setBackgroundColor(t), this._needsRefresh = !0
        }, refreshImmediately: function () {
            this._needsRefresh = this._needsRefreshHover = !1, this.painter.refresh(), this._needsRefresh = this._needsRefreshHover = !1
        }, refresh: function () {
            this._needsRefresh = !0
        }, flush: function () {
            var t;
            this._needsRefresh && (t = !0, this.refreshImmediately()), this._needsRefreshHover && (t = !0, this.refreshHoverImmediately()), t && this.trigger("rendered")
        }, addHover: function (t, e) {
            if (this.painter.addHover) {
                var i = this.painter.addHover(t, e);
                return this.refreshHover(), i
            }
        }, removeHover: function (t) {
            this.painter.removeHover && (this.painter.removeHover(t), this.refreshHover())
        }, clearHover: function () {
            this.painter.clearHover && (this.painter.clearHover(), this.refreshHover())
        }, refreshHover: function () {
            this._needsRefreshHover = !0
        }, refreshHoverImmediately: function () {
            this._needsRefreshHover = !1, this.painter.refreshHover && this.painter.refreshHover()
        }, resize: function (t) {
            t = t || {}, this.painter.resize(t.width, t.height), this.handler.resize()
        }, clearAnimation: function () {
            this.animation.clear()
        }, getWidth: function () {
            return this.painter.getWidth()
        }, getHeight: function () {
            return this.painter.getHeight()
        }, pathToImage: function (t, e) {
            return this.painter.pathToImage(t, e)
        }, setCursorStyle: function (t) {
            this.handler.setCursorStyle(t)
        }, findHover: function (t, e) {
            return this.handler.findHover(t, e)
        }, on: function (t, e, i) {
            this.handler.on(t, e, i)
        }, off: function (t, e) {
            this.handler.off(t, e)
        }, trigger: function (t, e) {
            this.handler.trigger(t, e)
        }, clear: function () {
            this.storage.delRoot(), this.painter.clear()
        }, dispose: function () {
            this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, Qn(this.id)
        }
    };
    var nv = (Object.freeze || Object)({version: ev, init: jn, dispose: Zn, getInstance: Kn, registerPainter: $n}),
        rv = f, av = S, ov = _, sv = "series\x00",
        lv = ["fontStyle", "fontWeight", "fontSize", "fontFamily", "rich", "tag", "color", "textBorderColor", "textBorderWidth", "width", "height", "lineHeight", "align", "verticalAlign", "baseline", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY", "textShadowColor", "textShadowBlur", "textShadowOffsetX", "textShadowOffsetY", "backgroundColor", "borderColor", "borderWidth", "borderRadius", "padding"],
        uv = 0, hv = ".", cv = "___EC__COMPONENT__CONTAINER___", dv = 0, fv = function (t) {
            for (var e = 0; e < t.length; e++) t[e][1] || (t[e][1] = t[e][0]);
            return function (e, i, n) {
                for (var r = {}, a = 0; a < t.length; a++) {
                    var o = t[a][1];
                    if (!(i && u(i, o) >= 0 || n && u(n, o) < 0)) {
                        var s = e.getShallow(o);
                        null != s && (r[t[a][0]] = s)
                    }
                }
                return r
            }
        },
        pv = fv([["lineWidth", "width"], ["stroke", "color"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]),
        gv = {
            getLineStyle: function (t) {
                var e = pv(this, t);
                return e.lineDash = this.getLineDash(e.lineWidth), e
            }, getLineDash: function (t) {
                null == t && (t = 1);
                var e = this.get("type"), i = Math.max(t, 2), n = 4 * t;
                return "solid" === e || null == e ? !1 : "dashed" === e ? [n, n] : [i, i]
            }
        },
        mv = fv([["fill", "color"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["opacity"], ["shadowColor"]]),
        vv = {
            getAreaStyle: function (t, e) {
                return mv(this, t, e)
            }
        }, yv = Math.pow, xv = Math.sqrt, _v = 1e-8, wv = 1e-4, bv = xv(3), Sv = 1 / 3, Mv = G(), Iv = G(), Cv = G(),
        Tv = Math.min, Dv = Math.max, Av = Math.sin, kv = Math.cos, Pv = 2 * Math.PI, Lv = G(), Ov = G(), zv = G(),
        Bv = [], Ev = [], Nv = {M: 1, L: 2, C: 3, Q: 4, A: 5, Z: 6, R: 7}, Rv = [], Fv = [], Vv = [], Gv = [],
        Hv = Math.min, Wv = Math.max, Xv = Math.cos, Uv = Math.sin, Yv = Math.sqrt, qv = Math.abs,
        jv = "undefined" != typeof Float32Array, Zv = function (t) {
            this._saveData = !t, this._saveData && (this.data = []), this._ctx = null
        };
    Zv.prototype = {
        constructor: Zv,
        _xi: 0,
        _yi: 0,
        _x0: 0,
        _y0: 0,
        _ux: 0,
        _uy: 0,
        _len: 0,
        _lineDash: null,
        _dashOffset: 0,
        _dashIdx: 0,
        _dashSum: 0,
        setScale: function (t, e, i) {
            i = i || 0, this._ux = qv(i / $g / t) || 0, this._uy = qv(i / $g / e) || 0
        },
        getContext: function () {
            return this._ctx
        },
        beginPath: function (t) {
            return this._ctx = t, t && t.beginPath(), t && (this.dpr = t.dpr), this._saveData && (this._len = 0), this._lineDash && (this._lineDash = null, this._dashOffset = 0), this
        },
        moveTo: function (t, e) {
            return this.addData(Nv.M, t, e), this._ctx && this._ctx.moveTo(t, e), this._x0 = t, this._y0 = e, this._xi = t, this._yi = e, this
        },
        lineTo: function (t, e) {
            var i = qv(t - this._xi) > this._ux || qv(e - this._yi) > this._uy || this._len < 5;
            return this.addData(Nv.L, t, e), this._ctx && i && (this._needsDash() ? this._dashedLineTo(t, e) : this._ctx.lineTo(t, e)), i && (this._xi = t, this._yi = e), this
        },
        bezierCurveTo: function (t, e, i, n, r, a) {
            return this.addData(Nv.C, t, e, i, n, r, a), this._ctx && (this._needsDash() ? this._dashedBezierTo(t, e, i, n, r, a) : this._ctx.bezierCurveTo(t, e, i, n, r, a)), this._xi = r, this._yi = a, this
        },
        quadraticCurveTo: function (t, e, i, n) {
            return this.addData(Nv.Q, t, e, i, n), this._ctx && (this._needsDash() ? this._dashedQuadraticTo(t, e, i, n) : this._ctx.quadraticCurveTo(t, e, i, n)), this._xi = i, this._yi = n, this
        },
        arc: function (t, e, i, n, r, a) {
            return this.addData(Nv.A, t, e, i, i, n, r - n, 0, a ? 0 : 1), this._ctx && this._ctx.arc(t, e, i, n, r, a), this._xi = Xv(r) * i + t, this._yi = Uv(r) * i + e, this
        },
        arcTo: function (t, e, i, n, r) {
            return this._ctx && this._ctx.arcTo(t, e, i, n, r), this
        },
        rect: function (t, e, i, n) {
            return this._ctx && this._ctx.rect(t, e, i, n), this.addData(Nv.R, t, e, i, n), this
        },
        closePath: function () {
            this.addData(Nv.Z);
            var t = this._ctx, e = this._x0, i = this._y0;
            return t && (this._needsDash() && this._dashedLineTo(e, i), t.closePath()), this._xi = e, this._yi = i, this
        },
        fill: function (t) {
            t && t.fill(), this.toStatic()
        },
        stroke: function (t) {
            t && t.stroke(), this.toStatic()
        },
        setLineDash: function (t) {
            if (t instanceof Array) {
                this._lineDash = t, this._dashIdx = 0;
                for (var e = 0, i = 0; i < t.length; i++) e += t[i];
                this._dashSum = e
            }
            return this
        },
        setLineDashOffset: function (t) {
            return this._dashOffset = t, this
        },
        len: function () {
            return this._len
        },
        setData: function (t) {
            var e = t.length;
            this.data && this.data.length === e || !jv || (this.data = new Float32Array(e));
            for (var i = 0; e > i; i++) this.data[i] = t[i];
            this._len = e
        },
        appendPath: function (t) {
            t instanceof Array || (t = [t]);
            for (var e = t.length, i = 0, n = this._len, r = 0; e > r; r++) i += t[r].len();
            jv && this.data instanceof Float32Array && (this.data = new Float32Array(n + i));
            for (var r = 0; e > r; r++) for (var a = t[r].data, o = 0; o < a.length; o++) this.data[n++] = a[o];
            this._len = n
        },
        addData: function (t) {
            if (this._saveData) {
                var e = this.data;
                this._len + arguments.length > e.length && (this._expandData(), e = this.data);
                for (var i = 0; i < arguments.length; i++) e[this._len++] = arguments[i];
                this._prevCmd = t
            }
        },
        _expandData: function () {
            if (!(this.data instanceof Array)) {
                for (var t = [], e = 0; e < this._len; e++) t[e] = this.data[e];
                this.data = t
            }
        },
        _needsDash: function () {
            return this._lineDash
        },
        _dashedLineTo: function (t, e) {
            var i, n, r = this._dashSum, a = this._dashOffset, o = this._lineDash, s = this._ctx, l = this._xi,
                u = this._yi, h = t - l, c = e - u, d = Yv(h * h + c * c), f = l, p = u, g = o.length;
            for (h /= d, c /= d, 0 > a && (a = r + a), a %= r, f -= a * h, p -= a * c; h > 0 && t >= f || 0 > h && f >= t || 0 === h && (c > 0 && e >= p || 0 > c && p >= e);) n = this._dashIdx, i = o[n], f += h * i, p += c * i, this._dashIdx = (n + 1) % g, h > 0 && l > f || 0 > h && f > l || c > 0 && u > p || 0 > c && p > u || s[n % 2 ? "moveTo" : "lineTo"](h >= 0 ? Hv(f, t) : Wv(f, t), c >= 0 ? Hv(p, e) : Wv(p, e));
            h = f - t, c = p - e, this._dashOffset = -Yv(h * h + c * c)
        },
        _dashedBezierTo: function (t, e, i, n, r, a) {
            var o, s, l, u, h, c = this._dashSum, d = this._dashOffset, f = this._lineDash, p = this._ctx, g = this._xi,
                m = this._yi, v = Sr, y = 0, x = this._dashIdx, _ = f.length, w = 0;
            for (0 > d && (d = c + d), d %= c, o = 0; 1 > o; o += .1) s = v(g, t, i, r, o + .1) - v(g, t, i, r, o), l = v(m, e, n, a, o + .1) - v(m, e, n, a, o), y += Yv(s * s + l * l);
            for (; _ > x && (w += f[x], !(w > d)); x++) ;
            for (o = (w - d) / y; 1 >= o;) u = v(g, t, i, r, o), h = v(m, e, n, a, o), x % 2 ? p.moveTo(u, h) : p.lineTo(u, h), o += f[x] / y, x = (x + 1) % _;
            x % 2 !== 0 && p.lineTo(r, a), s = r - u, l = a - h, this._dashOffset = -Yv(s * s + l * l)
        },
        _dashedQuadraticTo: function (t, e, i, n) {
            var r = i, a = n;
            i = (i + 2 * t) / 3, n = (n + 2 * e) / 3, t = (this._xi + 2 * t) / 3, e = (this._yi + 2 * e) / 3, this._dashedBezierTo(t, e, i, n, r, a)
        },
        toStatic: function () {
            var t = this.data;
            t instanceof Array && (t.length = this._len, jv && (this.data = new Float32Array(t)))
        },
        getBoundingRect: function () {
            Rv[0] = Rv[1] = Vv[0] = Vv[1] = Number.MAX_VALUE, Fv[0] = Fv[1] = Gv[0] = Gv[1] = -Number.MAX_VALUE;
            for (var t = this.data, e = 0, i = 0, n = 0, r = 0, a = 0; a < t.length;) {
                var o = t[a++];
                switch (1 === a && (e = t[a], i = t[a + 1], n = e, r = i), o) {
                    case Nv.M:
                        n = t[a++], r = t[a++], e = n, i = r, Vv[0] = n, Vv[1] = r, Gv[0] = n, Gv[1] = r;
                        break;
                    case Nv.L:
                        Er(e, i, t[a], t[a + 1], Vv, Gv), e = t[a++], i = t[a++];
                        break;
                    case Nv.C:
                        Nr(e, i, t[a++], t[a++], t[a++], t[a++], t[a], t[a + 1], Vv, Gv), e = t[a++], i = t[a++];
                        break;
                    case Nv.Q:
                        Rr(e, i, t[a++], t[a++], t[a], t[a + 1], Vv, Gv), e = t[a++], i = t[a++];
                        break;
                    case Nv.A:
                        var s = t[a++], l = t[a++], u = t[a++], h = t[a++], c = t[a++], d = t[a++] + c;
                        a += 1;
                        var f = 1 - t[a++];
                        1 === a && (n = Xv(c) * u + s, r = Uv(c) * h + l), Fr(s, l, u, h, c, d, f, Vv, Gv), e = Xv(d) * u + s, i = Uv(d) * h + l;
                        break;
                    case Nv.R:
                        n = e = t[a++], r = i = t[a++];
                        var p = t[a++], g = t[a++];
                        Er(n, r, n + p, r + g, Vv, Gv);
                        break;
                    case Nv.Z:
                        e = n, i = r
                }
                oe(Rv, Rv, Vv), se(Fv, Fv, Gv)
            }
            return 0 === a && (Rv[0] = Rv[1] = Fv[0] = Fv[1] = 0), new Ii(Rv[0], Rv[1], Fv[0] - Rv[0], Fv[1] - Rv[1])
        },
        rebuildPath: function (t) {
            for (var e, i, n, r, a, o, s = this.data, l = this._ux, u = this._uy, h = this._len, c = 0; h > c;) {
                var d = s[c++];
                switch (1 === c && (n = s[c], r = s[c + 1], e = n, i = r), d) {
                    case Nv.M:
                        e = n = s[c++], i = r = s[c++], t.moveTo(n, r);
                        break;
                    case Nv.L:
                        a = s[c++], o = s[c++], (qv(a - n) > l || qv(o - r) > u || c === h - 1) && (t.lineTo(a, o), n = a, r = o);
                        break;
                    case Nv.C:
                        t.bezierCurveTo(s[c++], s[c++], s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], r = s[c - 1];
                        break;
                    case Nv.Q:
                        t.quadraticCurveTo(s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], r = s[c - 1];
                        break;
                    case Nv.A:
                        var f = s[c++], p = s[c++], g = s[c++], m = s[c++], v = s[c++], y = s[c++], x = s[c++],
                            _ = s[c++], w = g > m ? g : m, b = g > m ? 1 : g / m, S = g > m ? m / g : 1,
                            M = Math.abs(g - m) > .001, I = v + y;
                        M ? (t.translate(f, p), t.rotate(x), t.scale(b, S), t.arc(0, 0, w, v, I, 1 - _), t.scale(1 / b, 1 / S), t.rotate(-x), t.translate(-f, -p)) : t.arc(f, p, w, v, I, 1 - _), 1 === c && (e = Xv(v) * g + f, i = Uv(v) * m + p), n = Xv(I) * g + f, r = Uv(I) * m + p;
                        break;
                    case Nv.R:
                        e = n = s[c], i = r = s[c + 1], t.rect(s[c++], s[c++], s[c++], s[c++]);
                        break;
                    case Nv.Z:
                        t.closePath(), n = e, r = i
                }
            }
        }
    }, Zv.CMD = Nv;
    var Kv = 2 * Math.PI, $v = 2 * Math.PI, Qv = Zv.CMD, Jv = 2 * Math.PI, ty = 1e-4, ey = [-1, -1, -1], iy = [-1, -1],
        ny = ym.prototype.getCanvasPattern, ry = Math.abs, ay = new Zv(!0);
    ta.prototype = {
        constructor: ta,
        type: "path",
        __dirtyPath: !0,
        strokeContainThreshold: 5,
        segmentIgnoreThreshold: 0,
        subPixelOptimize: !1,
        brush: function (t, e) {
            var i = this.style, n = this.path || ay, r = i.hasStroke(), a = i.hasFill(), o = i.fill, s = i.stroke,
                l = a && !!o.colorStops, u = r && !!s.colorStops, h = a && !!o.image, c = r && !!s.image;
            if (i.bind(t, this, e), this.setTransform(t), this.__dirty) {
                var d;
                l && (d = d || this.getBoundingRect(), this._fillGradient = i.getGradient(t, o, d)), u && (d = d || this.getBoundingRect(), this._strokeGradient = i.getGradient(t, s, d))
            }
            l ? t.fillStyle = this._fillGradient : h && (t.fillStyle = ny.call(o, t)), u ? t.strokeStyle = this._strokeGradient : c && (t.strokeStyle = ny.call(s, t));
            var f = i.lineDash, p = i.lineDashOffset, g = !!t.setLineDash, m = this.getGlobalScale();
            if (n.setScale(m[0], m[1], this.segmentIgnoreThreshold), this.__dirtyPath || f && !g && r ? (n.beginPath(t), f && !g && (n.setLineDash(f), n.setLineDashOffset(p)), this.buildPath(n, this.shape, !1), this.path && (this.__dirtyPath = !1)) : (t.beginPath(), this.path.rebuildPath(t)), a) if (null != i.fillOpacity) {
                var v = t.globalAlpha;
                t.globalAlpha = i.fillOpacity * i.opacity, n.fill(t), t.globalAlpha = v
            } else n.fill(t);
            if (f && g && (t.setLineDash(f), t.lineDashOffset = p), r) if (null != i.strokeOpacity) {
                var v = t.globalAlpha;
                t.globalAlpha = i.strokeOpacity * i.opacity, n.stroke(t), t.globalAlpha = v
            } else n.stroke(t);
            f && g && t.setLineDash([]), null != i.text && (this.restoreTransform(t), this.drawRectText(t, this.getBoundingRect()))
        },
        buildPath: function () {
        },
        createPathProxy: function () {
            this.path = new Zv
        },
        getBoundingRect: function () {
            var t = this._rect, e = this.style, i = !t;
            if (i) {
                var n = this.path;
                n || (n = this.path = new Zv), this.__dirtyPath && (n.beginPath(), this.buildPath(n, this.shape, !1)), t = n.getBoundingRect()
            }
            if (this._rect = t, e.hasStroke()) {
                var r = this._rectWithStroke || (this._rectWithStroke = t.clone());
                if (this.__dirty || i) {
                    r.copy(t);
                    var a = e.lineWidth, o = e.strokeNoScale ? this.getLineScale() : 1;
                    e.hasFill() || (a = Math.max(a, this.strokeContainThreshold || 4)), o > 1e-10 && (r.width += a / o, r.height += a / o, r.x -= a / o / 2, r.y -= a / o / 2)
                }
                return r
            }
            return t
        },
        contain: function (t, e) {
            var i = this.transformCoordToLocal(t, e), n = this.getBoundingRect(), r = this.style;
            if (t = i[0], e = i[1], n.contain(t, e)) {
                var a = this.path.data;
                if (r.hasStroke()) {
                    var o = r.lineWidth, s = r.strokeNoScale ? this.getLineScale() : 1;
                    if (s > 1e-10 && (r.hasFill() || (o = Math.max(o, this.strokeContainThreshold)), Jr(a, o / s, t, e))) return !0
                }
                if (r.hasFill()) return Qr(a, t, e)
            }
            return !1
        },
        dirty: function (t) {
            null == t && (t = !0), t && (this.__dirtyPath = t, this._rect = null), this.__dirty = this.__dirtyText = !0, this.__zr && this.__zr.refresh(), this.__clipTarget && this.__clipTarget.dirty()
        },
        animateShape: function (t) {
            return this.animate("shape", t)
        },
        attrKV: function (t, e) {
            "shape" === t ? (this.setShape(e), this.__dirtyPath = !0, this._rect = null) : Cn.prototype.attrKV.call(this, t, e)
        },
        setShape: function (t, e) {
            var i = this.shape;
            if (i) {
                if (S(t)) for (var n in t) t.hasOwnProperty(n) && (i[n] = t[n]); else i[t] = e;
                this.dirty(!0)
            }
            return this
        },
        getLineScale: function () {
            var t = this.transform;
            return t && ry(t[0] - 1) > 1e-10 && ry(t[3] - 1) > 1e-10 ? Math.sqrt(ry(t[0] * t[3] - t[2] * t[1])) : 1
        }
    }, ta.extend = function (t) {
        var e = function (e) {
            ta.call(this, e), t.style && this.style.extendFrom(t.style, !1);
            var i = t.shape;
            if (i) {
                this.shape = this.shape || {};
                var n = this.shape;
                for (var r in i) !n.hasOwnProperty(r) && i.hasOwnProperty(r) && (n[r] = i[r])
            }
            t.init && t.init.call(this, e)
        };
        h(e, ta);
        for (var i in t) "style" !== i && "shape" !== i && (e.prototype[i] = t[i]);
        return e
    }, h(ta, Cn);
    var oy = Zv.CMD, sy = [[], [], []], ly = Math.sqrt, uy = Math.atan2, hy = function (t, e) {
        var i, n, r, a, o, s, l = t.data, u = oy.M, h = oy.C, c = oy.L, d = oy.R, f = oy.A, p = oy.Q;
        for (r = 0, a = 0; r < l.length;) {
            switch (i = l[r++], a = r, n = 0, i) {
                case u:
                    n = 1;
                    break;
                case c:
                    n = 1;
                    break;
                case h:
                    n = 3;
                    break;
                case p:
                    n = 2;
                    break;
                case f:
                    var g = e[4], m = e[5], v = ly(e[0] * e[0] + e[1] * e[1]), y = ly(e[2] * e[2] + e[3] * e[3]),
                        x = uy(-e[1] / y, e[0] / v);
                    l[r] *= v, l[r++] += g, l[r] *= y, l[r++] += m, l[r++] *= v, l[r++] *= y, l[r++] += x, l[r++] += x, r += 2, a = r;
                    break;
                case d:
                    s[0] = l[r++], s[1] = l[r++], ae(s, s, e), l[a++] = s[0], l[a++] = s[1], s[0] += l[r++], s[1] += l[r++], ae(s, s, e), l[a++] = s[0], l[a++] = s[1]
            }
            for (o = 0; n > o; o++) {
                var s = sy[o];
                s[0] = l[r++], s[1] = l[r++], ae(s, s, e), l[a++] = s[0], l[a++] = s[1]
            }
        }
    }, cy = Math.sqrt, dy = Math.sin, fy = Math.cos, py = Math.PI, gy = function (t) {
        return Math.sqrt(t[0] * t[0] + t[1] * t[1])
    }, my = function (t, e) {
        return (t[0] * e[0] + t[1] * e[1]) / (gy(t) * gy(e))
    }, vy = function (t, e) {
        return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(my(t, e))
    }, yy = /([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi, xy = /-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g, _y = function (t) {
        Cn.call(this, t)
    };
    _y.prototype = {
        constructor: _y, type: "text", brush: function (t, e) {
            var i = this.style;
            this.__dirty && ln(i, !0), i.fill = i.stroke = i.shadowBlur = i.shadowColor = i.shadowOffsetX = i.shadowOffsetY = null;
            var n = i.text;
            return null != n && (n += ""), In(n, i) ? (this.setTransform(t), hn(this, t, n, i, null, e), void this.restoreTransform(t)) : void (t.__attrCachedBy = cm.NONE)
        }, getBoundingRect: function () {
            var t = this.style;
            if (this.__dirty && ln(t, !0), !this._rect) {
                var e = t.text;
                null != e ? e += "" : e = "";
                var i = Xi(t.text + "", t.font, t.textAlign, t.textVerticalAlign, t.textPadding, t.textLineHeight, t.rich);
                if (i.x += t.x || 0, i.y += t.y || 0, wn(t.textStroke, t.textStrokeWidth)) {
                    var n = t.textStrokeWidth;
                    i.x -= n / 2, i.y -= n / 2, i.width += n, i.height += n
                }
                this._rect = i
            }
            return this._rect
        }
    }, h(_y, Cn);
    var wy = ta.extend({
            type: "circle", shape: {cx: 0, cy: 0, r: 0}, buildPath: function (t, e, i) {
                i && t.moveTo(e.cx + e.r, e.cy), t.arc(e.cx, e.cy, e.r, 0, 2 * Math.PI, !0)
            }
        }), by = [["shadowBlur", 0], ["shadowColor", "#000"], ["shadowOffsetX", 0], ["shadowOffsetY", 0]],
        Sy = function (t) {
            return Up.browser.ie && Up.browser.version >= 11 ? function () {
                var e, i = this.__clipPaths, n = this.style;
                if (i) for (var r = 0; r < i.length; r++) {
                    var a = i[r], o = a && a.shape, s = a && a.type;
                    if (o && ("sector" === s && o.startAngle === o.endAngle || "rect" === s && (!o.width || !o.height))) {
                        for (var l = 0; l < by.length; l++) by[l][2] = n[by[l][0]], n[by[l][0]] = by[l][1];
                        e = !0;
                        break
                    }
                }
                if (t.apply(this, arguments), e) for (var l = 0; l < by.length; l++) n[by[l][0]] = by[l][2]
            } : t
        }, My = ta.extend({
            type: "sector",
            shape: {cx: 0, cy: 0, r0: 0, r: 0, startAngle: 0, endAngle: 2 * Math.PI, clockwise: !0},
            brush: Sy(ta.prototype.brush),
            buildPath: function (t, e) {
                var i = e.cx, n = e.cy, r = Math.max(e.r0 || 0, 0), a = Math.max(e.r, 0), o = e.startAngle, s = e.endAngle,
                    l = e.clockwise, u = Math.cos(o), h = Math.sin(o);
                t.moveTo(u * r + i, h * r + n), t.lineTo(u * a + i, h * a + n), t.arc(i, n, a, o, s, !l), t.lineTo(Math.cos(s) * r + i, Math.sin(s) * r + n), 0 !== r && t.arc(i, n, r, s, o, l), t.closePath()
            }
        }), Iy = ta.extend({
            type: "ring", shape: {cx: 0, cy: 0, r: 0, r0: 0}, buildPath: function (t, e) {
                var i = e.cx, n = e.cy, r = 2 * Math.PI;
                t.moveTo(i + e.r, n), t.arc(i, n, e.r, 0, r, !1), t.moveTo(i + e.r0, n), t.arc(i, n, e.r0, 0, r, !0)
            }
        }), Cy = function (t, e) {
            for (var i = t.length, n = [], r = 0, a = 1; i > a; a++) r += ee(t[a - 1], t[a]);
            var o = r / 2;
            o = i > o ? i : o;
            for (var a = 0; o > a; a++) {
                var s, l, u, h = a / (o - 1) * (e ? i : i - 1), c = Math.floor(h), d = h - c, f = t[c % i];
                e ? (s = t[(c - 1 + i) % i], l = t[(c + 1) % i], u = t[(c + 2) % i]) : (s = t[0 === c ? c : c - 1], l = t[c > i - 2 ? i - 1 : c + 1], u = t[c > i - 3 ? i - 1 : c + 2]);
                var p = d * d, g = d * p;
                n.push([sa(s[0], f[0], l[0], u[0], d, p, g), sa(s[1], f[1], l[1], u[1], d, p, g)])
            }
            return n
        }, Ty = function (t, e, i, n) {
            var r, a, o, s, l = [], u = [], h = [], c = [];
            if (n) {
                o = [1 / 0, 1 / 0], s = [-1 / 0, -1 / 0];
                for (var d = 0, f = t.length; f > d; d++) oe(o, o, t[d]), se(s, s, t[d]);
                oe(o, o, n[0]), se(s, s, n[1])
            }
            for (var d = 0, f = t.length; f > d; d++) {
                var p = t[d];
                if (i) r = t[d ? d - 1 : f - 1], a = t[(d + 1) % f]; else {
                    if (0 === d || d === f - 1) {
                        l.push(W(t[d]));
                        continue
                    }
                    r = t[d - 1], a = t[d + 1]
                }
                q(u, a, r), J(u, u, e);
                var g = ee(p, r), m = ee(p, a), v = g + m;
                0 !== v && (g /= v, m /= v), J(h, u, -g), J(c, u, m);
                var y = U([], p, h), x = U([], p, c);
                n && (se(y, y, o), oe(y, y, s), se(x, x, o), oe(x, x, s)), l.push(y), l.push(x)
            }
            return i && l.push(l.shift()), l
        }, Dy = ta.extend({
            type: "polygon",
            shape: {points: null, smooth: !1, smoothConstraint: null},
            buildPath: function (t, e) {
                la(t, e, !0)
            }
        }), Ay = ta.extend({
            type: "polyline",
            shape: {points: null, smooth: !1, smoothConstraint: null},
            style: {stroke: "#000", fill: null},
            buildPath: function (t, e) {
                la(t, e, !1)
            }
        }), ky = Math.round, Py = {}, Ly = ta.extend({
            type: "rect", shape: {r: 0, x: 0, y: 0, width: 0, height: 0}, buildPath: function (t, e) {
                var i, n, r, a;
                this.subPixelOptimize ? (ha(Py, e, this.style), i = Py.x, n = Py.y, r = Py.width, a = Py.height, Py.r = e.r, e = Py) : (i = e.x, n = e.y, r = e.width, a = e.height), e.r ? sn(t, e) : t.rect(i, n, r, a), t.closePath()
            }
        }), Oy = {}, zy = ta.extend({
            type: "line",
            shape: {x1: 0, y1: 0, x2: 0, y2: 0, percent: 1},
            style: {stroke: "#000", fill: null},
            buildPath: function (t, e) {
                var i, n, r, a;
                this.subPixelOptimize ? (ua(Oy, e, this.style), i = Oy.x1, n = Oy.y1, r = Oy.x2, a = Oy.y2) : (i = e.x1, n = e.y1, r = e.x2, a = e.y2);
                var o = e.percent;
                0 !== o && (t.moveTo(i, n), 1 > o && (r = i * (1 - o) + r * o, a = n * (1 - o) + a * o), t.lineTo(r, a))
            },
            pointAt: function (t) {
                var e = this.shape;
                return [e.x1 * (1 - t) + e.x2 * t, e.y1 * (1 - t) + e.y2 * t]
            }
        }), By = [], Ey = ta.extend({
            type: "bezier-curve",
            shape: {x1: 0, y1: 0, x2: 0, y2: 0, cpx1: 0, cpy1: 0, percent: 1},
            style: {stroke: "#000", fill: null},
            buildPath: function (t, e) {
                var i = e.x1, n = e.y1, r = e.x2, a = e.y2, o = e.cpx1, s = e.cpy1, l = e.cpx2, u = e.cpy2, h = e.percent;
                0 !== h && (t.moveTo(i, n), null == l || null == u ? (1 > h && (Or(i, o, r, h, By), o = By[1], r = By[2], Or(n, s, a, h, By), s = By[1], a = By[2]), t.quadraticCurveTo(o, s, r, a)) : (1 > h && (Tr(i, o, l, r, h, By), o = By[1], l = By[2], r = By[3], Tr(n, s, u, a, h, By), s = By[1], u = By[2], a = By[3]), t.bezierCurveTo(o, s, l, u, r, a)))
            },
            pointAt: function (t) {
                return da(this.shape, t, !1)
            },
            tangentAt: function (t) {
                var e = da(this.shape, t, !0);
                return te(e, e)
            }
        }), Ny = ta.extend({
            type: "arc",
            shape: {cx: 0, cy: 0, r: 0, startAngle: 0, endAngle: 2 * Math.PI, clockwise: !0},
            style: {stroke: "#000", fill: null},
            buildPath: function (t, e) {
                var i = e.cx, n = e.cy, r = Math.max(e.r, 0), a = e.startAngle, o = e.endAngle, s = e.clockwise,
                    l = Math.cos(a), u = Math.sin(a);
                t.moveTo(l * r + i, u * r + n), t.arc(i, n, r, a, o, !s)
            }
        }), Ry = ta.extend({
            type: "compound", shape: {paths: null}, _updatePathDirty: function () {
                for (var t = this.__dirtyPath, e = this.shape.paths, i = 0; i < e.length; i++) t = t || e[i].__dirtyPath;
                this.__dirtyPath = t, this.__dirty = this.__dirty || t
            }, beforeBrush: function () {
                this._updatePathDirty();
                for (var t = this.shape.paths || [], e = this.getGlobalScale(), i = 0; i < t.length; i++) t[i].path || t[i].createPathProxy(), t[i].path.setScale(e[0], e[1], t[i].segmentIgnoreThreshold)
            }, buildPath: function (t, e) {
                for (var i = e.paths || [], n = 0; n < i.length; n++) i[n].buildPath(t, i[n].shape, !0)
            }, afterBrush: function () {
                for (var t = this.shape.paths || [], e = 0; e < t.length; e++) t[e].__dirtyPath = !1
            }, getBoundingRect: function () {
                return this._updatePathDirty(), ta.prototype.getBoundingRect.call(this)
            }
        }), Fy = function (t) {
            this.colorStops = t || []
        };
    Fy.prototype = {
        constructor: Fy, addColorStop: function (t, e) {
            this.colorStops.push({offset: t, color: e})
        }
    };
    var Vy = function (t, e, i, n, r, a) {
        this.x = null == t ? 0 : t, this.y = null == e ? 0 : e, this.x2 = null == i ? 1 : i, this.y2 = null == n ? 0 : n, this.type = "linear", this.global = a || !1, Fy.call(this, r)
    };
    Vy.prototype = {constructor: Vy}, h(Vy, Fy);
    var Gy = function (t, e, i, n, r) {
        this.x = null == t ? .5 : t, this.y = null == e ? .5 : e, this.r = null == i ? .5 : i, this.type = "radial", this.global = r || !1, Fy.call(this, n)
    };
    Gy.prototype = {constructor: Gy}, h(Gy, Fy), fa.prototype.incremental = !0, fa.prototype.clearDisplaybles = function () {
        this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.dirty(), this.notClear = !1
    }, fa.prototype.addDisplayable = function (t, e) {
        e ? this._temporaryDisplayables.push(t) : this._displayables.push(t), this.dirty()
    }, fa.prototype.addDisplayables = function (t, e) {
        e = e || !1;
        for (var i = 0; i < t.length; i++) this.addDisplayable(t[i], e)
    }, fa.prototype.eachPendingDisplayable = function (t) {
        for (var e = this._cursor; e < this._displayables.length; e++) t && t(this._displayables[e]);
        for (var e = 0; e < this._temporaryDisplayables.length; e++) t && t(this._temporaryDisplayables[e])
    }, fa.prototype.update = function () {
        this.updateTransform();
        for (var t = this._cursor; t < this._displayables.length; t++) {
            var e = this._displayables[t];
            e.parent = this, e.update(), e.parent = null
        }
        for (var t = 0; t < this._temporaryDisplayables.length; t++) {
            var e = this._temporaryDisplayables[t];
            e.parent = this, e.update(), e.parent = null
        }
    }, fa.prototype.brush = function (t) {
        for (var e = this._cursor; e < this._displayables.length; e++) {
            var i = this._displayables[e];
            i.beforeBrush && i.beforeBrush(t), i.brush(t, e === this._cursor ? null : this._displayables[e - 1]), i.afterBrush && i.afterBrush(t)
        }
        this._cursor = e;
        for (var e = 0; e < this._temporaryDisplayables.length; e++) {
            var i = this._temporaryDisplayables[e];
            i.beforeBrush && i.beforeBrush(t), i.brush(t, 0 === e ? null : this._temporaryDisplayables[e - 1]), i.afterBrush && i.afterBrush(t)
        }
        this._temporaryDisplayables = [], this.notClear = !0
    };
    var Hy = [];
    fa.prototype.getBoundingRect = function () {
        if (!this._rect) {
            for (var t = new Ii(1 / 0, 1 / 0, -1 / 0, -1 / 0), e = 0; e < this._displayables.length; e++) {
                var i = this._displayables[e], n = i.getBoundingRect().clone();
                i.needLocalTransform() && n.applyTransform(i.getLocalTransform(Hy)), t.union(n)
            }
            this._rect = t
        }
        return this._rect
    }, fa.prototype.contain = function (t, e) {
        var i = this.transformCoordToLocal(t, e), n = this.getBoundingRect();
        if (n.contain(i[0], i[1])) for (var r = 0; r < this._displayables.length; r++) {
            var a = this._displayables[r];
            if (a.contain(t, e)) return !0
        }
        return !1
    }, h(fa, Cn);
    var Wy = Math.max, Xy = Math.min, Uy = {}, Yy = 1,
        qy = {color: "textFill", textBorderColor: "textStroke", textBorderWidth: "textStrokeWidth"}, jy = "emphasis",
        Zy = "normal", Ky = 1, $y = {}, Qy = {}, Jy = oa, tx = ca, ex = R(), ix = 0;
    ma("circle", wy), ma("sector", My), ma("ring", Iy), ma("polygon", Dy), ma("polyline", Ay), ma("rect", Ly), ma("line", zy), ma("bezierCurve", Ey), ma("arc", Ny);
    var nx = (Object.freeze || Object)({
            Z2_EMPHASIS_LIFT: Yy,
            CACHED_LABEL_STYLE_PROPERTIES: qy,
            extendShape: pa,
            extendPath: ga,
            registerShape: ma,
            getShapeClass: va,
            makePath: ya,
            makeImage: xa,
            mergePath: Jy,
            resizePath: wa,
            subPixelOptimizeLine: ba,
            subPixelOptimizeRect: Sa,
            subPixelOptimize: tx,
            setElementHoverStyle: Pa,
            setHoverStyle: Na,
            setAsHighDownDispatcher: Ra,
            isHighDownDispatcher: Fa,
            getHighlightDigit: Va,
            setLabelStyle: Ga,
            modifyLabelStyle: Ha,
            setTextStyle: Wa,
            setText: Xa,
            getFont: $a,
            updateProps: Ja,
            initProps: to,
            getTransform: eo,
            applyTransform: io,
            transformDirection: no,
            groupTransition: ro,
            clipPointsByRect: ao,
            clipRectByRect: oo,
            createIcon: so,
            linePolygonIntersect: lo,
            lineLineIntersect: uo,
            Group: am,
            Image: Tn,
            Text: _y,
            Circle: wy,
            Sector: My,
            Ring: Iy,
            Polygon: Dy,
            Polyline: Ay,
            Rect: Ly,
            Line: zy,
            BezierCurve: Ey,
            Arc: Ny,
            IncrementalDisplayable: fa,
            CompoundPath: Ry,
            LinearGradient: Vy,
            RadialGradient: Gy,
            BoundingRect: Ii
        }), rx = ["textStyle", "color"], ax = {
            getTextColor: function (t) {
                var e = this.ecModel;
                return this.getShallow("color") || (!t && e ? e.get(rx) : null)
            }, getFont: function () {
                return $a({
                    fontStyle: this.getShallow("fontStyle"),
                    fontWeight: this.getShallow("fontWeight"),
                    fontSize: this.getShallow("fontSize"),
                    fontFamily: this.getShallow("fontFamily")
                }, this.ecModel)
            }, getTextRect: function (t) {
                return Xi(t, this.getFont(), this.getShallow("align"), this.getShallow("verticalAlign") || this.getShallow("baseline"), this.getShallow("padding"), this.getShallow("lineHeight"), this.getShallow("rich"), this.getShallow("truncateText"))
            }
        },
        ox = fv([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["textPosition"], ["textAlign"]]),
        sx = {
            getItemStyle: function (t, e) {
                var i = ox(this, t, e), n = this.getBorderLineDash();
                return n && (i.lineDash = n), i
            }, getBorderLineDash: function () {
                var t = this.get("borderType");
                return "solid" === t || null == t ? null : "dashed" === t ? [5, 5] : [1, 1]
            }
        }, lx = c, ux = lr();
    fo.prototype = {
        constructor: fo, init: null, mergeOption: function (t) {
            r(this.option, t, !0)
        }, get: function (t, e) {
            return null == t ? this.option : po(this.option, this.parsePath(t), !e && go(this, t))
        }, getShallow: function (t, e) {
            var i = this.option, n = null == i ? i : i[t], r = !e && go(this, t);
            return null == n && r && (n = r.getShallow(t)), n
        }, getModel: function (t, e) {
            var i, n = null == t ? this.option : po(this.option, t = this.parsePath(t));
            return e = e || (i = go(this, t)) && i.getModel(t), new fo(n, e, this.ecModel)
        }, isEmpty: function () {
            return null == this.option
        }, restoreData: function () {
        }, clone: function () {
            var t = this.constructor;
            return new t(n(this.option))
        }, setReadOnly: function () {
        }, parsePath: function (t) {
            return "string" == typeof t && (t = t.split(".")), t
        }, customizeGetParent: function (t) {
            ux(this).getParent = t
        }, isAnimationEnabled: function () {
            if (!Up.node) {
                if (null != this.option.animation) return !!this.option.animation;
                if (this.parentModel) return this.parentModel.isAnimationEnabled()
            }
        }
    }, mr(fo), vr(fo), lx(fo, gv), lx(fo, vv), lx(fo, ax), lx(fo, sx);
    var hx = 0, cx = 1e-4, dx = 9007199254740991,
        fx = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,
        px = (Object.freeze || Object)({
            linearMap: _o,
            parsePercent: wo,
            round: bo,
            asc: So,
            getPrecision: Mo,
            getPrecisionSafe: Io,
            getPixelPrecision: Co,
            getPercentWithPrecision: To,
            MAX_SAFE_INTEGER: dx,
            remRadian: Do,
            isRadianAroundZero: Ao,
            parseDate: ko,
            quantity: Po,
            quantityExponent: Lo,
            nice: Oo,
            quantile: zo,
            reformIntervals: Bo,
            isNumeric: Eo
        }), gx = L, mx = /([&<>"'])/g, vx = {"&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;"},
        yx = ["a", "b", "c", "d", "e", "f", "g"], xx = function (t, e) {
            return "{" + t + (null == e ? "" : e) + "}"
        }, _x = Ki, bx = (Object.freeze || Object)({
            addCommas: No,
            toCamelCase: Ro,
            normalizeCssArray: gx,
            encodeHTML: Fo,
            formatTpl: Vo,
            formatTplSimple: Go,
            getTooltipMarker: Ho,
            formatTime: Xo,
            capitalFirst: Uo,
            truncateText: _x,
            getTextBoundingRect: Yo,
            getTextRect: qo,
            windowOpen: jo
        }), Sx = f, Mx = ["left", "right", "top", "bottom", "width", "height"],
        Ix = [["width", "left", "right"], ["height", "top", "bottom"]], Cx = Zo,
        Tx = (x(Zo, "vertical"), x(Zo, "horizontal"), {
            getBoxLayoutParams: function () {
                return {
                    left: this.get("left"),
                    top: this.get("top"),
                    right: this.get("right"),
                    bottom: this.get("bottom"),
                    width: this.get("width"),
                    height: this.get("height")
                }
            }
        }), Dx = lr(), Ax = fo.extend({
            type: "component",
            id: "",
            name: "",
            mainType: "",
            subType: "",
            componentIndex: 0,
            defaultOption: null,
            ecModel: null,
            dependentModels: [],
            uid: null,
            layoutMode: null,
            $constructor: function (t, e, i, n) {
                fo.call(this, t, e, i, n), this.uid = mo("ec_cpt_model")
            },
            init: function (t, e, i) {
                this.mergeDefaultAndTheme(t, i)
            },
            mergeDefaultAndTheme: function (t, e) {
                var i = this.layoutMode, n = i ? Qo(t) : {}, a = e.getTheme();
                r(t, a.get(this.mainType)), r(t, this.getDefaultOption()), i && $o(t, n, i)
            },
            mergeOption: function (t) {
                r(this.option, t, !0);
                var e = this.layoutMode;
                e && $o(this.option, t, e)
            },
            optionUpdated: function () {
            },
            getDefaultOption: function () {
                var t = Dx(this);
                if (!t.defaultOption) {
                    for (var e = [], i = this.constructor; i;) {
                        var n = i.prototype.defaultOption;
                        n && e.push(n), i = i.superClass
                    }
                    for (var a = {}, o = e.length - 1; o >= 0; o--) a = r(a, e[o], !0);
                    t.defaultOption = a
                }
                return t.defaultOption
            },
            getReferringComponents: function (t) {
                return this.ecModel.queryComponents({
                    mainType: t,
                    index: this.get(t + "Index", !0),
                    id: this.get(t + "Id", !0)
                })
            }
        });
    _r(Ax, {registerWhenExtend: !0}), vo(Ax), yo(Ax, ts), c(Ax, Tx);
    var kx = "";
    "undefined" != typeof navigator && (kx = navigator.platform || "");
    var Px = {
            color: ["#c23531", "#2f4554", "#61a0a8", "#d48265", "#91c7ae", "#749f83", "#ca8622", "#bda29a", "#6e7074", "#546570", "#c4ccd3"],
            gradientColor: ["#f6efa6", "#d88273", "#bf444c"],
            textStyle: {
                fontFamily: kx.match(/^Win/) ? "Microsoft YaHei" : "sans-serif",
                fontSize: 12,
                fontStyle: "normal",
                fontWeight: "normal"
            },
            blendMode: null,
            animation: "auto",
            animationDuration: 1e3,
            animationDurationUpdate: 300,
            animationEasing: "exponentialOut",
            animationEasingUpdate: "cubicOut",
            animationThreshold: 2e3,
            progressiveThreshold: 3e3,
            progressive: 400,
            hoverLayerThreshold: 3e3,
            useUTC: !1
        }, Lx = lr(), Ox = {
            clearColorPalette: function () {
                Lx(this).colorIdx = 0, Lx(this).colorNameMap = {}
            }, getColorFromPalette: function (t, e, i) {
                e = e || this;
                var n = Lx(e), r = n.colorIdx || 0, a = n.colorNameMap = n.colorNameMap || {};
                if (a.hasOwnProperty(t)) return a[t];
                var o = Jn(this.get("color", !0)), s = this.get("colorLayer", !0), l = null != i && s ? es(s, i) : o;
                if (l = l || o, l && l.length) {
                    var u = l[r];
                    return t && (a[t] = u), n.colorIdx = (r + 1) % l.length, u
                }
            }
        }, zx = "original", Bx = "arrayRows", Ex = "objectRows", Nx = "keyedColumns", Rx = "unknown", Fx = "typedArray",
        Vx = "column", Gx = "row";
    is.seriesDataToSource = function (t) {
        return new is({data: t, sourceFormat: I(t) ? Fx : zx, fromDataset: !1})
    }, vr(is);
    var Hx = {Must: 1, Might: 2, Not: 3}, Wx = lr(), Xx = "\x00_ec_inner", Ux = fo.extend({
        init: function (t, e, i, n) {
            i = i || {}, this.option = null, this._theme = new fo(i), this._optionManager = n
        }, setOption: function (t, e) {
            O(!(Xx in t), "please use chart.getOption()"), this._optionManager.setOption(t, e), this.resetOption(null)
        }, resetOption: function (t) {
            var e = !1, i = this._optionManager;
            if (!t || "recreate" === t) {
                var n = i.mountOption("recreate" === t);
                this.option && "recreate" !== t ? (this.restoreData(), this.mergeOption(n)) : ys.call(this, n), e = !0
            }
            if (("timeline" === t || "media" === t) && this.restoreData(), !t || "recreate" === t || "timeline" === t) {
                var r = i.getTimelineOption(this);
                r && (this.mergeOption(r), e = !0)
            }
            if (!t || "recreate" === t || "media" === t) {
                var a = i.getMediaOption(this, this._api);
                a.length && f(a, function (t) {
                    this.mergeOption(t, e = !0)
                }, this)
            }
            return e
        }, mergeOption: function (t) {
            function e(e, n) {
                var r = Jn(t[e]), s = nr(a.get(e), r);
                rr(s), f(s, function (t) {
                    var i = t.option;
                    S(i) && (t.keyInfo.mainType = e, t.keyInfo.subType = _s(e, i, t.exist))
                });
                var l = xs(a, n);
                i[e] = [], a.set(e, []), f(s, function (t, n) {
                    var r = t.exist, s = t.option;
                    if (O(S(s) || r, "Empty component definition"), s) {
                        var u = Ax.getClass(e, t.keyInfo.subType, !0);
                        if (r && r.constructor === u) r.name = t.keyInfo.name, r.mergeOption(s, this), r.optionUpdated(s, !1); else {
                            var h = o({dependentModels: l, componentIndex: n}, t.keyInfo);
                            r = new u(s, this, this, h), o(r, h), r.init(s, this, this, h), r.optionUpdated(null, !0)
                        }
                    } else r.mergeOption({}, this), r.optionUpdated({}, !1);
                    a.get(e)[n] = r, i[e][n] = r.option
                }, this), "series" === e && ws(this, a.get("series"))
            }

            var i = this.option, a = this._componentsMap, s = [];
            as(this), f(t, function (t, e) {
                null != t && (Ax.hasClass(e) ? e && s.push(e) : i[e] = null == i[e] ? n(t) : r(i[e], t, !0))
            }), Ax.topologicalTravel(s, Ax.getAllClassMainTypes(), e, this), this._seriesIndicesMap = R(this._seriesIndices = this._seriesIndices || [])
        }, getOption: function () {
            var t = n(this.option);
            return f(t, function (e, i) {
                if (Ax.hasClass(i)) {
                    for (var e = Jn(e), n = e.length - 1; n >= 0; n--) or(e[n]) && e.splice(n, 1);
                    t[i] = e
                }
            }), delete t[Xx], t
        }, getTheme: function () {
            return this._theme
        }, getComponent: function (t, e) {
            var i = this._componentsMap.get(t);
            return i ? i[e || 0] : void 0
        }, queryComponents: function (t) {
            var e = t.mainType;
            if (!e) return [];
            var i = t.index, n = t.id, r = t.name, a = this._componentsMap.get(e);
            if (!a || !a.length) return [];
            var o;
            if (null != i) _(i) || (i = [i]), o = m(p(i, function (t) {
                return a[t]
            }), function (t) {
                return !!t
            }); else if (null != n) {
                var s = _(n);
                o = m(a, function (t) {
                    return s && u(n, t.id) >= 0 || !s && t.id === n
                })
            } else if (null != r) {
                var l = _(r);
                o = m(a, function (t) {
                    return l && u(r, t.name) >= 0 || !l && t.name === r
                })
            } else o = a.slice();
            return bs(o, t)
        }, findComponents: function (t) {
            function e(t) {
                var e = r + "Index", i = r + "Id", n = r + "Name";
                return !t || null == t[e] && null == t[i] && null == t[n] ? null : {
                    mainType: r,
                    index: t[e],
                    id: t[i],
                    name: t[n]
                }
            }

            function i(e) {
                return t.filter ? m(e, t.filter) : e
            }

            var n = t.query, r = t.mainType, a = e(n), o = a ? this.queryComponents(a) : this._componentsMap.get(r);
            return i(bs(o, t))
        }, eachComponent: function (t, e, i) {
            var n = this._componentsMap;
            if ("function" == typeof t) i = e, e = t, n.each(function (t, n) {
                f(t, function (t, r) {
                    e.call(i, n, t, r)
                })
            }); else if (b(t)) f(n.get(t), e, i); else if (S(t)) {
                var r = this.findComponents(t);
                f(r, e, i)
            }
        }, getSeriesByName: function (t) {
            var e = this._componentsMap.get("series");
            return m(e, function (e) {
                return e.name === t
            })
        }, getSeriesByIndex: function (t) {
            return this._componentsMap.get("series")[t]
        }, getSeriesByType: function (t) {
            var e = this._componentsMap.get("series");
            return m(e, function (e) {
                return e.subType === t
            })
        }, getSeries: function () {
            return this._componentsMap.get("series").slice()
        }, getSeriesCount: function () {
            return this._componentsMap.get("series").length
        }, eachSeries: function (t, e) {
            f(this._seriesIndices, function (i) {
                var n = this._componentsMap.get("series")[i];
                t.call(e, n, i)
            }, this)
        }, eachRawSeries: function (t, e) {
            f(this._componentsMap.get("series"), t, e)
        }, eachSeriesByType: function (t, e, i) {
            f(this._seriesIndices, function (n) {
                var r = this._componentsMap.get("series")[n];
                r.subType === t && e.call(i, r, n)
            }, this)
        }, eachRawSeriesByType: function (t, e, i) {
            return f(this.getSeriesByType(t), e, i)
        }, isSeriesFiltered: function (t) {
            return null == this._seriesIndicesMap.get(t.componentIndex)
        }, getCurrentSeriesIndices: function () {
            return (this._seriesIndices || []).slice()
        }, filterSeries: function (t, e) {
            var i = m(this._componentsMap.get("series"), t, e);
            ws(this, i)
        }, restoreData: function (t) {
            var e = this._componentsMap;
            ws(this, e.get("series"));
            var i = [];
            e.each(function (t, e) {
                i.push(e)
            }), Ax.topologicalTravel(i, Ax.getAllClassMainTypes(), function (i) {
                f(e.get(i), function (e) {
                    ("series" !== i || !ms(e, t)) && e.restoreData()
                })
            })
        }
    });
    c(Ux, Ox);
    var Yx = ["getDom", "getZr", "getWidth", "getHeight", "getDevicePixelRatio", "dispatchAction", "isDisposed", "on", "off", "getDataURL", "getConnectedDataURL", "getModel", "getOption", "getViewOfComponentModel", "getViewOfSeriesModel"],
        qx = {};
    Ms.prototype = {
        constructor: Ms, create: function (t, e) {
            var i = [];
            f(qx, function (n) {
                var r = n.create(t, e);
                i = i.concat(r || [])
            }), this._coordinateSystems = i
        }, update: function (t, e) {
            f(this._coordinateSystems, function (i) {
                i.update && i.update(t, e)
            })
        }, getCoordinateSystems: function () {
            return this._coordinateSystems.slice()
        }
    }, Ms.register = function (t, e) {
        qx[t] = e
    }, Ms.get = function (t) {
        return qx[t]
    };
    var jx = f, Zx = n, Kx = p, $x = r, Qx = /^(min|max)?(.+)$/;
    Is.prototype = {
        constructor: Is, setOption: function (t, e) {
            t && f(Jn(t.series), function (t) {
                t && t.data && I(t.data) && B(t.data)
            }), t = Zx(t);
            var i = this._optionBackup, n = Cs.call(this, t, e, !i);
            this._newBaseOption = n.baseOption, i ? (ks(i.baseOption, n.baseOption), n.timelineOptions.length && (i.timelineOptions = n.timelineOptions), n.mediaList.length && (i.mediaList = n.mediaList), n.mediaDefault && (i.mediaDefault = n.mediaDefault)) : this._optionBackup = n
        }, mountOption: function (t) {
            var e = this._optionBackup;
            return this._timelineOptions = Kx(e.timelineOptions, Zx), this._mediaList = Kx(e.mediaList, Zx), this._mediaDefault = Zx(e.mediaDefault), this._currentMediaIndices = [], Zx(t ? e.baseOption : this._newBaseOption)
        }, getTimelineOption: function (t) {
            var e, i = this._timelineOptions;
            if (i.length) {
                var n = t.getComponent("timeline");
                n && (e = Zx(i[n.getCurrentIndex()], !0))
            }
            return e
        }, getMediaOption: function () {
            var t = this._api.getWidth(), e = this._api.getHeight(), i = this._mediaList, n = this._mediaDefault,
                r = [], a = [];
            if (!i.length && !n) return a;
            for (var o = 0, s = i.length; s > o; o++) Ts(i[o].query, t, e) && r.push(o);
            return !r.length && n && (r = [-1]), r.length && !As(r, this._currentMediaIndices) && (a = Kx(r, function (t) {
                return Zx(-1 === t ? n.option : i[t].option)
            })), this._currentMediaIndices = r, a
        }
    };
    var Jx = f, t_ = S, e_ = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"],
        i_ = function (t, e) {
            Jx(Ns(t.series), function (t) {
                t_(t) && Es(t)
            });
            var i = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"];
            e && i.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), Jx(i, function (e) {
                Jx(Ns(t[e]), function (t) {
                    t && (zs(t, "axisLabel"), zs(t.axisPointer, "label"))
                })
            }), Jx(Ns(t.parallel), function (t) {
                var e = t && t.parallelAxisDefault;
                zs(e, "axisLabel"), zs(e && e.axisPointer, "label")
            }), Jx(Ns(t.calendar), function (t) {
                Ls(t, "itemStyle"), zs(t, "dayLabel"), zs(t, "monthLabel"), zs(t, "yearLabel")
            }), Jx(Ns(t.radar), function (t) {
                zs(t, "name")
            }), Jx(Ns(t.geo), function (t) {
                t_(t) && (Bs(t), Jx(Ns(t.regions), function (t) {
                    Bs(t)
                }))
            }), Jx(Ns(t.timeline), function (t) {
                Bs(t), Ls(t, "label"), Ls(t, "itemStyle"), Ls(t, "controlStyle", !0);
                var e = t.data;
                _(e) && f(e, function (t) {
                    S(t) && (Ls(t, "label"), Ls(t, "itemStyle"))
                })
            }), Jx(Ns(t.toolbox), function (t) {
                Ls(t, "iconStyle"), Jx(t.feature, function (t) {
                    Ls(t, "iconStyle")
                })
            }), zs(Rs(t.axisPointer), "label"), zs(Rs(t.tooltip).axisPointer, "label")
        }, n_ = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]],
        r_ = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"],
        a_ = function (t, e) {
            i_(t, e), t.series = Jn(t.series), f(t.series, function (t) {
                if (S(t)) {
                    var e = t.type;
                    if ("line" === e) null != t.clipOverflow && (t.clip = t.clipOverflow); else if ("pie" === e || "gauge" === e) null != t.clockWise && (t.clockwise = t.clockWise); else if ("gauge" === e) {
                        var i = Fs(t, "pointer.color");
                        null != i && Vs(t, "itemStyle.color", i)
                    }
                    Gs(t)
                }
            }), t.dataRange && (t.visualMap = t.dataRange), f(r_, function (e) {
                var i = t[e];
                i && (_(i) || (i = [i]), f(i, function (t) {
                    Gs(t)
                }))
            })
        }, o_ = function (t) {
            var e = R();
            t.eachSeries(function (t) {
                var i = t.get("stack");
                if (i) {
                    var n = e.get(i) || e.set(i, []), r = t.getData(), a = {
                        stackResultDimension: r.getCalculationInfo("stackResultDimension"),
                        stackedOverDimension: r.getCalculationInfo("stackedOverDimension"),
                        stackedDimension: r.getCalculationInfo("stackedDimension"),
                        stackedByDimension: r.getCalculationInfo("stackedByDimension"),
                        isStackedByIndex: r.getCalculationInfo("isStackedByIndex"),
                        data: r,
                        seriesModel: t
                    };
                    if (!a.stackedDimension || !a.isStackedByIndex && !a.stackedByDimension) return;
                    n.length && r.setCalculationInfo("stackedOnSeries", n[n.length - 1].seriesModel), n.push(a)
                }
            }), e.each(Hs)
        }, s_ = Ws.prototype;
    s_.pure = !1, s_.persistent = !0, s_.getSource = function () {
        return this._source
    };
    var l_ = {
        arrayRows_column: {
            pure: !0, count: function () {
                return Math.max(0, this._data.length - this._source.startIndex)
            }, getItem: function (t) {
                return this._data[t + this._source.startIndex]
            }, appendData: Ys
        },
        arrayRows_row: {
            pure: !0, count: function () {
                var t = this._data[0];
                return t ? Math.max(0, t.length - this._source.startIndex) : 0
            }, getItem: function (t) {
                t += this._source.startIndex;
                for (var e = [], i = this._data, n = 0; n < i.length; n++) {
                    var r = i[n];
                    e.push(r ? r[t] : null)
                }
                return e
            }, appendData: function () {
                throw new Error('Do not support appendData when set seriesLayoutBy: "row".')
            }
        },
        objectRows: {pure: !0, count: Xs, getItem: Us, appendData: Ys},
        keyedColumns: {
            pure: !0, count: function () {
                var t = this._source.dimensionsDefine[0].name, e = this._data[t];
                return e ? e.length : 0
            }, getItem: function (t) {
                for (var e = [], i = this._source.dimensionsDefine, n = 0; n < i.length; n++) {
                    var r = this._data[i[n].name];
                    e.push(r ? r[t] : null)
                }
                return e
            }, appendData: function (t) {
                var e = this._data;
                f(t, function (t, i) {
                    for (var n = e[i] || (e[i] = []), r = 0; r < (t || []).length; r++) n.push(t[r])
                })
            }
        },
        original: {count: Xs, getItem: Us, appendData: Ys},
        typedArray: {
            persistent: !1, pure: !0, count: function () {
                return this._data ? this._data.length / this._dimSize : 0
            }, getItem: function (t, e) {
                t -= this._offset, e = e || [];
                for (var i = this._dimSize * t, n = 0; n < this._dimSize; n++) e[n] = this._data[i + n];
                return e
            }, appendData: function (t) {
                this._data = t
            }, clean: function () {
                this._offset += this.count(), this._data = null
            }
        }
    }, u_ = {
        arrayRows: qs, objectRows: function (t, e, i, n) {
            return null != i ? t[n] : t
        }, keyedColumns: qs, original: function (t, e, i) {
            var n = er(t);
            return null != i && n instanceof Array ? n[i] : n
        }, typedArray: qs
    }, h_ = {
        arrayRows: js, objectRows: function (t, e) {
            return Zs(t[e], this._dimensionInfos[e])
        }, keyedColumns: js, original: function (t, e, i, n) {
            var r = t && (null == t.value ? t : t.value);
            return !this._rawData.pure && ir(t) && (this.hasItemOption = !0), Zs(r instanceof Array ? r[n] : r, this._dimensionInfos[e])
        }, typedArray: function (t, e, i, n) {
            return t[n]
        }
    }, c_ = /\{@(.+?)\}/g, d_ = {
        getDataParams: function (t, e) {
            var i = this.getData(e), n = this.getRawValue(t, e), r = i.getRawIndex(t), a = i.getName(t),
                o = i.getRawDataItem(t), s = i.getItemVisual(t, "color"), l = i.getItemVisual(t, "borderColor"),
                u = this.ecModel.getComponent("tooltip"), h = u && u.get("renderMode"), c = fr(h), d = this.mainType,
                f = "series" === d, p = i.userOutput;
            return {
                componentType: d,
                componentSubType: this.subType,
                componentIndex: this.componentIndex,
                seriesType: f ? this.subType : null,
                seriesIndex: this.seriesIndex,
                seriesId: f ? this.id : null,
                seriesName: f ? this.name : null,
                name: a,
                dataIndex: r,
                data: o,
                dataType: e,
                value: n,
                color: s,
                borderColor: l,
                dimensionNames: p ? p.dimensionNames : null,
                encode: p ? p.encode : null,
                marker: Ho({color: s, renderMode: c}),
                $vars: ["seriesName", "name", "value"]
            }
        }, getFormattedLabel: function (t, e, i, n, r) {
            e = e || "normal";
            var a = this.getData(i), o = a.getItemModel(t), s = this.getDataParams(t, i);
            null != n && s.value instanceof Array && (s.value = s.value[n]);
            var l = o.get("normal" === e ? [r || "label", "formatter"] : [e, r || "label", "formatter"]);
            if ("function" == typeof l) return s.status = e, s.dimensionIndex = n, l(s);
            if ("string" == typeof l) {
                var u = Vo(l, s);
                return u.replace(c_, function (e, i) {
                    var n = i.length;
                    return "[" === i.charAt(0) && "]" === i.charAt(n - 1) && (i = +i.slice(1, n - 1)), Ks(a, t, i)
                })
            }
        }, getRawValue: function (t, e) {
            return Ks(this.getData(e), t)
        }, formatTooltip: function () {
        }
    }, f_ = Js.prototype;
    f_.perform = function (t) {
        function e(t) {
            return !(t >= 1) && (t = 1), t
        }

        var i = this._upstream, n = t && t.skip;
        if (this._dirty && i) {
            var r = this.context;
            r.data = r.outputData = i.context.outputData
        }
        this.__pipeline && (this.__pipeline.currentTask = this);
        var a;
        this._plan && !n && (a = this._plan(this.context));
        var o = e(this._modBy), s = this._modDataCount || 0, l = e(t && t.modBy), u = t && t.modDataCount || 0;
        (o !== l || s !== u) && (a = "reset");
        var h;
        (this._dirty || "reset" === a) && (this._dirty = !1, h = el(this, n)), this._modBy = l, this._modDataCount = u;
        var c = t && t.step;
        if (this._dueEnd = i ? i._outputDueEnd : this._count ? this._count(this.context) : 1 / 0, this._progress) {
            var d = this._dueIndex, f = Math.min(null != c ? this._dueIndex + c : 1 / 0, this._dueEnd);
            if (!n && (h || f > d)) {
                var p = this._progress;
                if (_(p)) for (var g = 0; g < p.length; g++) tl(this, p[g], d, f, l, u); else tl(this, p, d, f, l, u)
            }
            this._dueIndex = f;
            var m = null != this._settedOutputEnd ? this._settedOutputEnd : f;
            this._outputDueEnd = m
        } else this._dueIndex = this._outputDueEnd = null != this._settedOutputEnd ? this._settedOutputEnd : this._dueEnd;
        return this.unfinished()
    };
    var p_ = function () {
        function t() {
            return i > n ? n++ : null
        }

        function e() {
            var t = n % o * r + Math.ceil(n / o), e = n >= i ? null : a > t ? t : n;
            return n++, e
        }

        var i, n, r, a, o, s = {
            reset: function (l, u, h, c) {
                n = l, i = u, r = h, a = c, o = Math.ceil(a / r), s.next = r > 1 && a > 0 ? e : t
            }
        };
        return s
    }();
    f_.dirty = function () {
        this._dirty = !0, this._onDirty && this._onDirty(this.context)
    }, f_.unfinished = function () {
        return this._progress && this._dueIndex < this._dueEnd
    }, f_.pipe = function (t) {
        (this._downstream !== t || this._dirty) && (this._downstream = t, t._upstream = this, t.dirty())
    }, f_.dispose = function () {
        this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0)
    }, f_.getUpstream = function () {
        return this._upstream
    }, f_.getDownstream = function () {
        return this._downstream
    }, f_.setOutputEnd = function (t) {
        this._outputDueEnd = this._settedOutputEnd = t
    };
    var g_ = lr(), m_ = Ax.extend({
        type: "series.__base__",
        seriesIndex: 0,
        coordinateSystem: null,
        defaultOption: null,
        legendVisualProvider: null,
        visualColorAccessPath: "itemStyle.color",
        visualBorderColorAccessPath: "itemStyle.borderColor",
        layoutMode: null,
        init: function (t, e, i) {
            this.seriesIndex = this.componentIndex, this.dataTask = Qs({
                count: rl,
                reset: al
            }), this.dataTask.context = {model: this}, this.mergeDefaultAndTheme(t, i), os(this);
            var n = this.getInitialData(t, i);
            sl(n, this), this.dataTask.context.data = n, g_(this).dataBeforeProcessed = n, il(this)
        },
        mergeDefaultAndTheme: function (t, e) {
            var i = this.layoutMode, n = i ? Qo(t) : {}, a = this.subType;
            Ax.hasClass(a) && (a += "Series"), r(t, e.getTheme().get(this.subType)), r(t, this.getDefaultOption()), tr(t, "label", ["show"]), this.fillDataTextStyle(t.data), i && $o(t, n, i)
        },
        mergeOption: function (t, e) {
            t = r(this.option, t, !0), this.fillDataTextStyle(t.data);
            var i = this.layoutMode;
            i && $o(this.option, t, i), os(this);
            var n = this.getInitialData(t, e);
            sl(n, this), this.dataTask.dirty(), this.dataTask.context.data = n, g_(this).dataBeforeProcessed = n, il(this)
        },
        fillDataTextStyle: function (t) {
            if (t && !I(t)) for (var e = ["show"], i = 0; i < t.length; i++) t[i] && t[i].label && tr(t[i], "label", e)
        },
        getInitialData: function () {
        },
        appendData: function (t) {
            var e = this.getRawData();
            e.appendData(t.data)
        },
        getData: function (t) {
            var e = ul(this);
            if (e) {
                var i = e.context.data;
                return null == t ? i : i.getLinkedData(t)
            }
            return g_(this).data
        },
        setData: function (t) {
            var e = ul(this);
            if (e) {
                var i = e.context;
                i.data !== t && e.modifyOutputEnd && e.setOutputEnd(t.count()), i.outputData = t, e !== this.dataTask && (i.data = t)
            }
            g_(this).data = t
        },
        getSource: function () {
            return rs(this)
        },
        getRawData: function () {
            return g_(this).dataBeforeProcessed
        },
        getBaseAxis: function () {
            var t = this.coordinateSystem;
            return t && t.getBaseAxis && t.getBaseAxis()
        },
        formatTooltip: function (t, e, i, n) {
            function r(i) {
                function r(t, i) {
                    var r = c.getDimensionInfo(i);
                    if (r && r.otherDims.tooltip !== !1) {
                        var d = r.type, f = "sub" + o.seriesIndex + "at" + h,
                            p = Ho({color: y, type: "subItem", renderMode: n, markerId: f}),
                            g = "string" == typeof p ? p : p.content,
                            m = (a ? g + Fo(r.displayName || "-") + ": " : "") + Fo("ordinal" === d ? t + "" : "time" === d ? e ? "" : Xo("yyyy/MM/dd hh:mm:ss", t) : No(t));
                        m && s.push(m), l && (u[f] = y, ++h)
                    }
                }

                var a = g(i, function (t, e, i) {
                    var n = c.getDimensionInfo(i);
                    return t |= n && n.tooltip !== !1 && null != n.displayName
                }, 0), s = [];
                d.length ? f(d, function (e) {
                    r(Ks(c, t, e), e)
                }) : f(i, r);
                var p = a ? l ? "\n" : "<br/>" : "", m = p + s.join(p || ", ");
                return {renderMode: n, content: m, style: u}
            }

            function a(t) {
                return {renderMode: n, content: Fo(No(t)), style: u}
            }

            var o = this;
            n = n || "html";
            var s = "html" === n ? "<br/>" : "\n", l = "richText" === n, u = {}, h = 0, c = this.getData(),
                d = c.mapDimension("defaultedTooltip", !0), p = d.length, m = this.getRawValue(t), v = _(m),
                y = c.getItemVisual(t, "color");
            S(y) && y.colorStops && (y = (y.colorStops[0] || {}).color), y = y || "transparent";
            var x = p > 1 || v && !p ? r(m) : a(p ? Ks(c, t, d[0]) : v ? m[0] : m), w = x.content,
                b = o.seriesIndex + "at" + h, M = Ho({color: y, type: "item", renderMode: n, markerId: b});
            u[b] = y, ++h;
            var I = c.getName(t), C = this.name;
            ar(this) || (C = ""), C = C ? Fo(C) + (e ? ": " : s) : "";
            var T = "string" == typeof M ? M : M.content, D = e ? T + C + w : C + T + (I ? Fo(I) + ": " + w : w);
            return {html: D, markers: u}
        },
        isAnimationEnabled: function () {
            if (Up.node) return !1;
            var t = this.getShallow("animation");
            return t && this.getData().count() > this.getShallow("animationThreshold") && (t = !1), t
        },
        restoreData: function () {
            this.dataTask.dirty()
        },
        getColorFromPalette: function (t, e, i) {
            var n = this.ecModel, r = Ox.getColorFromPalette.call(this, t, e, i);
            return r || (r = n.getColorFromPalette(t, e, i)), r
        },
        coordDimToDataDim: function (t) {
            return this.getRawData().mapDimension(t, !0)
        },
        getProgressive: function () {
            return this.get("progressive")
        },
        getProgressiveThreshold: function () {
            return this.get("progressiveThreshold")
        },
        getAxisTooltipData: null,
        getTooltipPosition: null,
        pipeTask: null,
        preventIncremental: null,
        pipelineContext: null
    });
    c(m_, d_), c(m_, Ox);
    var v_ = function () {
        this.group = new am, this.uid = mo("viewComponent")
    };
    v_.prototype = {
        constructor: v_, init: function () {
        }, render: function () {
        }, dispose: function () {
        }, filterForExposedEvent: null
    };
    var y_ = v_.prototype;
    y_.updateView = y_.updateLayout = y_.updateVisual = function () {
    }, mr(v_), _r(v_, {registerWhenExtend: !0});
    var x_ = function () {
        var t = lr();
        return function (e) {
            var i = t(e), n = e.pipelineContext, r = i.large, a = i.progressiveRender, o = i.large = n && n.large,
                s = i.progressiveRender = n && n.progressiveRender;
            return !!(r ^ o || a ^ s) && "reset"
        }
    }, __ = lr(), w_ = x_();
    hl.prototype = {
        type: "chart", init: function () {
        }, render: function () {
        }, highlight: function (t, e, i, n) {
            dl(t.getData(), n, "emphasis")
        }, downplay: function (t, e, i, n) {
            dl(t.getData(), n, "normal")
        }, remove: function () {
            this.group.removeAll()
        }, dispose: function () {
        }, incrementalPrepareRender: null, incrementalRender: null, updateTransform: null, filterForExposedEvent: null
    };
    var b_ = hl.prototype;
    b_.updateView = b_.updateLayout = b_.updateVisual = function (t, e, i, n) {
        this.render(t, e, i, n)
    }, mr(hl, ["dispose"]), _r(hl, {registerWhenExtend: !0}), hl.markUpdateMethod = function (t, e) {
        __(t).updateMethod = e
    };
    var S_ = {
        incrementalPrepareRender: {
            progress: function (t, e) {
                e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload)
            }
        }, render: {
            forceFirstProgress: !0, progress: function (t, e) {
                e.view.render(e.model, e.ecModel, e.api, e.payload)
            }
        }
    }, M_ = "\x00__throttleOriginMethod", I_ = "\x00__throttleRate", C_ = "\x00__throttleType", T_ = {
        createOnAllSeries: !0, performRawSeries: !0, reset: function (t, e) {
            var i = t.getData(), n = (t.visualColorAccessPath || "itemStyle.color").split("."), r = t.get(n),
                a = !w(r) || r instanceof Fy ? null : r;
            (!r || a) && (r = t.getColorFromPalette(t.name, null, e.getSeriesCount())), i.setVisual("color", r);
            var o = (t.visualBorderColorAccessPath || "itemStyle.borderColor").split("."), s = t.get(o);
            if (i.setVisual("borderColor", s), !e.isSeriesFiltered(t)) {
                a && i.each(function (e) {
                    i.setItemVisual(e, "color", a(t.getDataParams(e)))
                });
                var l = function (t, e) {
                    var i = t.getItemModel(e), r = i.get(n, !0), a = i.get(o, !0);
                    null != r && t.setItemVisual(e, "color", r), null != a && t.setItemVisual(e, "borderColor", a)
                };
                return {dataEach: i.hasItemOption ? l : null}
            }
        }
    }, D_ = {
        legend: {selector: {all: "全选", inverse: "反选"}},
        toolbox: {
            brush: {
                title: {
                    rect: "矩形选择",
                    polygon: "圈选",
                    lineX: "横向选择",
                    lineY: "纵向选择",
                    keep: "保持选择",
                    clear: "清除选择"
                }
            },
            dataView: {title: "数据视图", lang: ["数据视图", "关闭", "刷新"]},
            dataZoom: {title: {zoom: "区域缩放", back: "区域缩放还原"}},
            magicType: {title: {line: "切换为折线图", bar: "切换为柱状图", stack: "切换为堆叠", tiled: "切换为平铺"}},
            restore: {title: "还原"},
            saveAsImage: {title: "保存为图片", lang: ["右键另存为图片"]}
        },
        series: {
            typeNames: {
                pie: "饼图",
                bar: "柱状图",
                line: "折线图",
                scatter: "散点图",
                effectScatter: "涟漪散点图",
                radar: "雷达图",
                tree: "树图",
                treemap: "矩形树图",
                boxplot: "箱型图",
                candlestick: "K线图",
                k: "K线图",
                heatmap: "热力图",
                map: "地图",
                parallel: "平行坐标图",
                lines: "线图",
                graph: "关系图",
                sankey: "桑基图",
                funnel: "漏斗图",
                gauge: "仪表盘图",
                pictorialBar: "象形柱图",
                themeRiver: "主题河流图",
                sunburst: "旭日图"
            }
        },
        aria: {
            general: {withTitle: "这是一个关于“{title}”的图表。", withoutTitle: "这是一个图表，"},
            series: {
                single: {
                    prefix: "",
                    withName: "图表类型是{seriesType}，表示{seriesName}。",
                    withoutName: "图表类型是{seriesType}。"
                },
                multiple: {
                    prefix: "它由{seriesCount}个图表系列组成。",
                    withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType}，",
                    withoutName: "第{seriesId}个系列是一个{seriesType}，",
                    separator: {middle: "；", end: "。"}
                }
            },
            data: {
                allData: "其数据是——",
                partialData: "其中，前{displayCnt}项是——",
                withName: "{name}的数据是{value}",
                withoutName: "{value}",
                separator: {middle: "，", end: ""}
            }
        }
    }, A_ = function (t, e) {
        function i(t, e) {
            if ("string" != typeof t) return t;
            var i = t;
            return f(e, function (t, e) {
                i = i.replace(new RegExp("\\{\\s*" + e + "\\s*\\}", "g"), t)
            }), i
        }

        function n(t) {
            var e = o.get(t);
            if (null == e) {
                for (var i = t.split("."), n = D_.aria, r = 0; r < i.length; ++r) n = n[i[r]];
                return n
            }
            return e
        }

        function r() {
            var t = e.getModel("title").option;
            return t && t.length && (t = t[0]), t && t.text
        }

        function a(t) {
            return D_.series.typeNames[t] || "自定义图"
        }

        var o = e.getModel("aria");
        if (o.get("show")) {
            if (o.get("description")) return void t.setAttribute("aria-label", o.get("description"));
            var s = 0;
            e.eachSeries(function () {
                ++s
            }, this);
            var l, u = o.get("data.maxCount") || 10, h = o.get("series.maxCount") || 10, c = Math.min(s, h);
            if (!(1 > s)) {
                var d = r();
                l = d ? i(n("general.withTitle"), {title: d}) : n("general.withoutTitle");
                var p = [], g = s > 1 ? "series.multiple.prefix" : "series.single.prefix";
                l += i(n(g), {seriesCount: s}), e.eachSeries(function (t, e) {
                    if (c > e) {
                        var r, o = t.get("name"), l = "series." + (s > 1 ? "multiple" : "single") + ".";
                        r = n(o ? l + "withName" : l + "withoutName"), r = i(r, {
                            seriesId: t.seriesIndex,
                            seriesName: t.get("name"),
                            seriesType: a(t.subType)
                        });
                        var h = t.getData();
                        window.data = h, r += h.count() > u ? i(n("data.partialData"), {displayCnt: u}) : n("data.allData");
                        for (var d = [], f = 0; f < h.count(); f++) if (u > f) {
                            var g = h.getName(f), m = Ks(h, f);
                            d.push(i(n(g ? "data.withName" : "data.withoutName"), {name: g, value: m}))
                        }
                        r += d.join(n("data.separator.middle")) + n("data.separator.end"), p.push(r)
                    }
                }), l += p.join(n("series.multiple.separator.middle")) + n("series.multiple.separator.end"), t.setAttribute("aria-label", l)
            }
        }
    }, k_ = Math.PI, P_ = function (t, e) {
        e = e || {}, s(e, {
            text: "loading",
            textColor: "#000",
            fontSize: "12px",
            maskColor: "rgba(255, 255, 255, 0.8)",
            showSpinner: !0,
            color: "#c23531",
            spinnerRadius: 10,
            lineWidth: 5,
            zlevel: 0
        });
        var i = new am, n = new Ly({style: {fill: e.maskColor}, zlevel: e.zlevel, z: 1e4});
        i.add(n);
        var r = e.fontSize + " sans-serif", a = new Ly({
            style: {
                fill: "none",
                text: e.text,
                font: r,
                textPosition: "right",
                textDistance: 10,
                textFill: e.textColor
            }, zlevel: e.zlevel, z: 10001
        });
        if (i.add(a), e.showSpinner) {
            var o = new Ny({
                shape: {startAngle: -k_ / 2, endAngle: -k_ / 2 + .1, r: e.spinnerRadius},
                style: {stroke: e.color, lineCap: "round", lineWidth: e.lineWidth},
                zlevel: e.zlevel,
                z: 10001
            });
            o.animateShape(!0).when(1e3, {endAngle: 3 * k_ / 2}).start("circularInOut"), o.animateShape(!0).when(1e3, {startAngle: 3 * k_ / 2}).delay(300).start("circularInOut"), i.add(o)
        }
        return i.resize = function () {
            var i = Wi(e.text, r), s = e.showSpinner ? e.spinnerRadius : 0,
                l = (t.getWidth() - 2 * s - (e.showSpinner && i ? 10 : 0) - i) / 2 - (e.showSpinner ? 0 : i / 2),
                u = t.getHeight() / 2;
            e.showSpinner && o.setShape({cx: l, cy: u}), a.setShape({
                x: l - s,
                y: u - s,
                width: 2 * s,
                height: 2 * s
            }), n.setShape({x: 0, y: 0, width: t.getWidth(), height: t.getHeight()})
        }, i.resize(), i
    }, L_ = vl.prototype;
    L_.restoreData = function (t, e) {
        t.restoreData(e), this._stageTaskMap.each(function (t) {
            var e = t.overallTask;
            e && e.dirty()
        })
    }, L_.getPerformArgs = function (t, e) {
        if (t.__pipeline) {
            var i = this._pipelineMap.get(t.__pipeline.id), n = i.context,
                r = !e && i.progressiveEnabled && (!n || n.progressiveRender) && t.__idxInPipeline > i.blockIndex,
                a = r ? i.step : null, o = n && n.modDataCount, s = null != o ? Math.ceil(o / a) : null;
            return {step: a, modBy: s, modDataCount: o}
        }
    }, L_.getPipeline = function (t) {
        return this._pipelineMap.get(t)
    }, L_.updateStreamModes = function (t, e) {
        var i = this._pipelineMap.get(t.uid), n = t.getData(), r = n.count(),
            a = i.progressiveEnabled && e.incrementalPrepareRender && r >= i.threshold,
            o = t.get("large") && r >= t.get("largeThreshold"), s = "mod" === t.get("progressiveChunkMode") ? r : null;
        t.pipelineContext = i.context = {progressiveRender: a, modDataCount: s, large: o}
    }, L_.restorePipelines = function (t) {
        var e = this, i = e._pipelineMap = R();
        t.eachSeries(function (t) {
            var n = t.getProgressive(), r = t.uid;
            i.set(r, {
                id: r,
                head: null,
                tail: null,
                threshold: t.getProgressiveThreshold(),
                progressiveEnabled: n && !(t.preventIncremental && t.preventIncremental()),
                blockIndex: -1,
                step: Math.round(n || 700),
                count: 0
            }), Al(e, t, t.dataTask)
        })
    }, L_.prepareStageTasks = function () {
        var t = this._stageTaskMap, e = this.ecInstance.getModel(), i = this.api;
        f(this._allHandlers, function (n) {
            var r = t.get(n.uid) || t.set(n.uid, []);
            n.reset && xl(this, n, r, e, i), n.overallReset && _l(this, n, r, e, i)
        }, this)
    }, L_.prepareView = function (t, e, i, n) {
        var r = t.renderTask, a = r.context;
        a.model = e, a.ecModel = i, a.api = n, r.__block = !t.incrementalPrepareRender, Al(this, e, r)
    }, L_.performDataProcessorTasks = function (t, e) {
        yl(this, this._dataProcessorHandlers, t, e, {block: !0})
    }, L_.performVisualTasks = function (t, e, i) {
        yl(this, this._visualHandlers, t, e, i)
    }, L_.performSeriesTasks = function (t) {
        var e;
        t.eachSeries(function (t) {
            e |= t.dataTask.perform()
        }), this.unfinished |= e
    }, L_.plan = function () {
        this._pipelineMap.each(function (t) {
            var e = t.tail;
            do {
                if (e.__block) {
                    t.blockIndex = e.__idxInPipeline;
                    break
                }
                e = e.getUpstream()
            } while (e)
        })
    };
    var O_ = L_.updatePayload = function (t, e) {
        "remain" !== e && (t.context.payload = e)
    }, z_ = Tl(0);
    vl.wrapStageHandler = function (t, e) {
        return w(t) && (t = {
            overallReset: t,
            seriesType: kl(t)
        }), t.uid = mo("stageHandler"), e && (t.visualType = e), t
    };
    var B_, E_ = {}, N_ = {};
    Pl(E_, Ux), Pl(N_, Ss), E_.eachSeriesByType = E_.eachRawSeriesByType = function (t) {
        B_ = t
    }, E_.eachComponent = function (t) {
        "series" === t.mainType && t.subType && (B_ = t.subType)
    };
    var R_ = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"],
        F_ = {
            color: R_,
            colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], R_]
        }, V_ = "#eee", G_ = function () {
            return {
                axisLine: {lineStyle: {color: V_}},
                axisTick: {lineStyle: {color: V_}},
                axisLabel: {textStyle: {color: V_}},
                splitLine: {lineStyle: {type: "dashed", color: "#aaa"}},
                splitArea: {areaStyle: {color: V_}}
            }
        },
        H_ = ["#dd6b66", "#759aa0", "#e69d87", "#8dc1a9", "#ea7e53", "#eedd78", "#73a373", "#73b9bc", "#7289ab", "#91ca8c", "#f49f42"],
        W_ = {
            color: H_,
            backgroundColor: "#333",
            tooltip: {axisPointer: {lineStyle: {color: V_}, crossStyle: {color: V_}, label: {color: "#000"}}},
            legend: {textStyle: {color: V_}},
            textStyle: {color: V_},
            title: {textStyle: {color: V_}},
            toolbox: {iconStyle: {normal: {borderColor: V_}}},
            dataZoom: {textStyle: {color: V_}},
            visualMap: {textStyle: {color: V_}},
            timeline: {
                lineStyle: {color: V_},
                itemStyle: {normal: {color: H_[1]}},
                label: {normal: {textStyle: {color: V_}}},
                controlStyle: {normal: {color: V_, borderColor: V_}}
            },
            timeAxis: G_(),
            logAxis: G_(),
            valueAxis: G_(),
            categoryAxis: G_(),
            line: {symbol: "circle"},
            graph: {color: H_},
            gauge: {title: {textStyle: {color: V_}}},
            candlestick: {
                itemStyle: {
                    normal: {
                        color: "#FD1050",
                        color0: "#0CF49B",
                        borderColor: "#FD1050",
                        borderColor0: "#0CF49B"
                    }
                }
            }
        };
    W_.categoryAxis.splitLine.show = !1, Ax.extend({
        type: "dataset",
        defaultOption: {seriesLayoutBy: Vx, sourceHeader: null, dimensions: null, source: null},
        optionUpdated: function () {
            ns(this)
        }
    }), v_.extend({type: "dataset"});
    var X_ = ta.extend({
        type: "ellipse", shape: {cx: 0, cy: 0, rx: 0, ry: 0}, buildPath: function (t, e) {
            var i = .5522848, n = e.cx, r = e.cy, a = e.rx, o = e.ry, s = a * i, l = o * i;
            t.moveTo(n - a, r), t.bezierCurveTo(n - a, r - l, n - s, r - o, n, r - o), t.bezierCurveTo(n + s, r - o, n + a, r - l, n + a, r), t.bezierCurveTo(n + a, r + l, n + s, r + o, n, r + o), t.bezierCurveTo(n - s, r + o, n - a, r + l, n - a, r), t.closePath()
        }
    }), U_ = /[\s,]+/;
    Ol.prototype.parse = function (t, e) {
        e = e || {};
        var i = Ll(t);
        if (!i) throw new Error("Illegal svg");
        var n = new am;
        this._root = n;
        var r = i.getAttribute("viewBox") || "", a = parseFloat(i.getAttribute("width") || e.width),
            o = parseFloat(i.getAttribute("height") || e.height);
        isNaN(a) && (a = null), isNaN(o) && (o = null), Nl(i, n, null, !0);
        for (var s = i.firstChild; s;) this._parseNode(s, n), s = s.nextSibling;
        var l, u;
        if (r) {
            var h = z(r).split(U_);
            h.length >= 4 && (l = {
                x: parseFloat(h[0] || 0),
                y: parseFloat(h[1] || 0),
                width: parseFloat(h[2]),
                height: parseFloat(h[3])
            })
        }
        if (l && null != a && null != o && (u = Gl(l, a, o), !e.ignoreViewBox)) {
            var c = n;
            n = new am, n.add(c), c.scale = u.scale.slice(), c.position = u.position.slice()
        }
        return e.ignoreRootClip || null == a || null == o || n.setClipPath(new Ly({
            shape: {
                x: 0,
                y: 0,
                width: a,
                height: o
            }
        })), {root: n, width: a, height: o, viewBoxRect: l, viewBoxTransform: u}
    }, Ol.prototype._parseNode = function (t, e) {
        var i = t.nodeName.toLowerCase();
        "defs" === i ? this._isDefine = !0 : "text" === i && (this._isText = !0);
        var n;
        if (this._isDefine) {
            var r = q_[i];
            if (r) {
                var a = r.call(this, t), o = t.getAttribute("id");
                o && (this._defs[o] = a)
            }
        } else {
            var r = Y_[i];
            r && (n = r.call(this, t, e), e.add(n))
        }
        for (var s = t.firstChild; s;) 1 === s.nodeType && this._parseNode(s, n), 3 === s.nodeType && this._isText && this._parseText(s, n), s = s.nextSibling;
        "defs" === i ? this._isDefine = !1 : "text" === i && (this._isText = !1)
    }, Ol.prototype._parseText = function (t, e) {
        if (1 === t.nodeType) {
            var i = t.getAttribute("dx") || 0, n = t.getAttribute("dy") || 0;
            this._textX += parseFloat(i), this._textY += parseFloat(n)
        }
        var r = new _y({
            style: {text: t.textContent, transformText: !0},
            position: [this._textX || 0, this._textY || 0]
        });
        Bl(e, r), Nl(t, r, this._defs);
        var a = r.style.fontSize;
        a && 9 > a && (r.style.fontSize = 9, r.scale = r.scale || [1, 1], r.scale[0] *= a / 9, r.scale[1] *= a / 9);
        var o = r.getBoundingRect();
        return this._textX += o.width, e.add(r), r
    };
    var Y_ = {
            g: function (t, e) {
                var i = new am;
                return Bl(e, i), Nl(t, i, this._defs), i
            }, rect: function (t, e) {
                var i = new Ly;
                return Bl(e, i), Nl(t, i, this._defs), i.setShape({
                    x: parseFloat(t.getAttribute("x") || 0),
                    y: parseFloat(t.getAttribute("y") || 0),
                    width: parseFloat(t.getAttribute("width") || 0),
                    height: parseFloat(t.getAttribute("height") || 0)
                }), i
            }, circle: function (t, e) {
                var i = new wy;
                return Bl(e, i), Nl(t, i, this._defs), i.setShape({
                    cx: parseFloat(t.getAttribute("cx") || 0),
                    cy: parseFloat(t.getAttribute("cy") || 0),
                    r: parseFloat(t.getAttribute("r") || 0)
                }), i
            }, line: function (t, e) {
                var i = new zy;
                return Bl(e, i), Nl(t, i, this._defs), i.setShape({
                    x1: parseFloat(t.getAttribute("x1") || 0),
                    y1: parseFloat(t.getAttribute("y1") || 0),
                    x2: parseFloat(t.getAttribute("x2") || 0),
                    y2: parseFloat(t.getAttribute("y2") || 0)
                }), i
            }, ellipse: function (t, e) {
                var i = new X_;
                return Bl(e, i), Nl(t, i, this._defs), i.setShape({
                    cx: parseFloat(t.getAttribute("cx") || 0),
                    cy: parseFloat(t.getAttribute("cy") || 0),
                    rx: parseFloat(t.getAttribute("rx") || 0),
                    ry: parseFloat(t.getAttribute("ry") || 0)
                }), i
            }, polygon: function (t, e) {
                var i = t.getAttribute("points");
                i && (i = El(i));
                var n = new Dy({shape: {points: i || []}});
                return Bl(e, n), Nl(t, n, this._defs), n
            }, polyline: function (t, e) {
                var i = new ta;
                Bl(e, i), Nl(t, i, this._defs);
                var n = t.getAttribute("points");
                n && (n = El(n));
                var r = new Ay({shape: {points: n || []}});
                return r
            }, image: function (t, e) {
                var i = new Tn;
                return Bl(e, i), Nl(t, i, this._defs), i.setStyle({
                    image: t.getAttribute("xlink:href"),
                    x: t.getAttribute("x"),
                    y: t.getAttribute("y"),
                    width: t.getAttribute("width"),
                    height: t.getAttribute("height")
                }), i
            }, text: function (t, e) {
                var i = t.getAttribute("x") || 0, n = t.getAttribute("y") || 0, r = t.getAttribute("dx") || 0,
                    a = t.getAttribute("dy") || 0;
                this._textX = parseFloat(i) + parseFloat(r), this._textY = parseFloat(n) + parseFloat(a);
                var o = new am;
                return Bl(e, o), Nl(t, o, this._defs), o
            }, tspan: function (t, e) {
                var i = t.getAttribute("x"), n = t.getAttribute("y");
                null != i && (this._textX = parseFloat(i)), null != n && (this._textY = parseFloat(n));
                var r = t.getAttribute("dx") || 0, a = t.getAttribute("dy") || 0, o = new am;
                return Bl(e, o), Nl(t, o, this._defs), this._textX += r, this._textY += a, o
            }, path: function (t, e) {
                var i = t.getAttribute("d") || "", n = ra(i);
                return Bl(e, n), Nl(t, n, this._defs), n
            }
        }, q_ = {
            lineargradient: function (t) {
                var e = parseInt(t.getAttribute("x1") || 0, 10), i = parseInt(t.getAttribute("y1") || 0, 10),
                    n = parseInt(t.getAttribute("x2") || 10, 10), r = parseInt(t.getAttribute("y2") || 0, 10),
                    a = new Vy(e, i, n, r);
                return zl(t, a), a
            }, radialgradient: function () {
            }
        }, j_ = {
            fill: "fill",
            stroke: "stroke",
            "stroke-width": "lineWidth",
            opacity: "opacity",
            "fill-opacity": "fillOpacity",
            "stroke-opacity": "strokeOpacity",
            "stroke-dasharray": "lineDash",
            "stroke-dashoffset": "lineDashOffset",
            "stroke-linecap": "lineCap",
            "stroke-linejoin": "lineJoin",
            "stroke-miterlimit": "miterLimit",
            "font-family": "fontFamily",
            "font-size": "fontSize",
            "font-style": "fontStyle",
            "font-weight": "fontWeight",
            "text-align": "textAlign",
            "alignment-baseline": "textBaseline"
        }, Z_ = /url\(\s*#(.*?)\)/, K_ = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,
        $_ = /([^\s:;]+)\s*:\s*([^:;]+)/g, Q_ = R(), J_ = {
            registerMap: function (t, e, i) {
                var n;
                return _(e) ? n = e : e.svg ? n = [{
                    type: "svg",
                    source: e.svg,
                    specialAreas: e.specialAreas
                }] : (e.geoJson && !e.features && (i = e.specialAreas, e = e.geoJson), n = [{
                    type: "geoJSON",
                    source: e,
                    specialAreas: i
                }]), f(n, function (t) {
                    var e = t.type;
                    "geoJson" === e && (e = t.type = "geoJSON");
                    var i = tw[e];
                    i(t)
                }), Q_.set(t, n)
            }, retrieveMap: function (t) {
                return Q_.get(t)
            }
        }, tw = {
            geoJSON: function (t) {
                var e = t.source;
                t.geoJSON = b(e) ? "undefined" != typeof JSON && JSON.parse ? JSON.parse(e) : new Function("return (" + e + ");")() : e
            }, svg: function (t) {
                t.svgXML = Ll(t.source)
            }
        }, ew = O, iw = f, nw = w, rw = S, aw = Ax.parseClassType, ow = "4.9.0", sw = {zrender: "4.3.2"}, lw = 1, uw = 1e3,
        hw = 800, cw = 900, dw = 5e3, fw = 1e3, pw = 1100, gw = 2e3, mw = 3e3, vw = 3500, yw = 4e3, xw = 5e3, _w = {
            PROCESSOR: {FILTER: uw, SERIES_FILTER: hw, STATISTIC: dw},
            VISUAL: {
                LAYOUT: fw,
                PROGRESSIVE_LAYOUT: pw,
                GLOBAL: gw,
                CHART: mw,
                POST_CHART_LAYOUT: vw,
                COMPONENT: yw,
                BRUSH: xw
            }
        }, ww = "__flagInMainProcess", bw = "__optionUpdated", Sw = /^[a-zA-Z0-9_]+$/;
    Wl.prototype.on = Hl("on", !0), Wl.prototype.off = Hl("off", !0), Wl.prototype.one = Hl("one", !0), c(Wl, fg);
    var Mw = Xl.prototype;
    Mw._onframe = function () {
        if (!this._disposed) {
            var t = this._scheduler;
            if (this[bw]) {
                var e = this[bw].silent;
                this[ww] = !0, Yl(this), Iw.update.call(this), this[ww] = !1, this[bw] = !1, Kl.call(this, e), $l.call(this, e)
            } else if (t.unfinished) {
                var i = lw, n = this._model, r = this._api;
                t.unfinished = !1;
                do {
                    var a = +new Date;
                    t.performSeriesTasks(n), t.performDataProcessorTasks(n), jl(this, n), t.performVisualTasks(n), nu(this, this._model, r, "remain"), i -= +new Date - a
                } while (i > 0 && t.unfinished);
                t.unfinished || this._zr.flush()
            }
        }
    }, Mw.getDom = function () {
        return this._dom
    }, Mw.getZr = function () {
        return this._zr
    }, Mw.setOption = function (t, e, i) {
        if (!this._disposed) {
            var n;
            if (rw(e) && (i = e.lazyUpdate, n = e.silent, e = e.notMerge), this[ww] = !0, !this._model || e) {
                var r = new Is(this._api), a = this._theme, o = this._model = new Ux;
                o.scheduler = this._scheduler, o.init(null, null, a, r)
            }
            this._model.setOption(t, kw), i ? (this[bw] = {silent: n}, this[ww] = !1) : (Yl(this), Iw.update.call(this), this._zr.flush(), this[bw] = !1, this[ww] = !1, Kl.call(this, n), $l.call(this, n))
        }
    }, Mw.setTheme = function () {
        console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")
    }, Mw.getModel = function () {
        return this._model
    }, Mw.getOption = function () {
        return this._model && this._model.getOption()
    }, Mw.getWidth = function () {
        return this._zr.getWidth()
    }, Mw.getHeight = function () {
        return this._zr.getHeight()
    }, Mw.getDevicePixelRatio = function () {
        return this._zr.painter.dpr || window.devicePixelRatio || 1
    }, Mw.getRenderedCanvas = function (t) {
        if (Up.canvasSupported) {
            t = t || {}, t.pixelRatio = t.pixelRatio || 1, t.backgroundColor = t.backgroundColor || this._model.get("backgroundColor");
            var e = this._zr;
            return e.painter.getRenderedCanvas(t)
        }
    }, Mw.getSvgDataURL = function () {
        if (Up.svgSupported) {
            var t = this._zr, e = t.storage.getDisplayList();
            return f(e, function (t) {
                t.stopAnimation(!0)
            }), t.painter.toDataURL()
        }
    }, Mw.getDataURL = function (t) {
        if (!this._disposed) {
            t = t || {};
            var e = t.excludeComponents, i = this._model, n = [], r = this;
            iw(e, function (t) {
                i.eachComponent({mainType: t}, function (t) {
                    var e = r._componentsMap[t.__viewId];
                    e.group.ignore || (n.push(e), e.group.ignore = !0)
                })
            });
            var a = "svg" === this._zr.painter.getType() ? this.getSvgDataURL() : this.getRenderedCanvas(t).toDataURL("image/" + (t && t.type || "png"));
            return iw(n, function (t) {
                t.group.ignore = !1
            }), a
        }
    }, Mw.getConnectedDataURL = function (t) {
        if (!this._disposed && Up.canvasSupported) {
            var e = "svg" === t.type, i = this.group, r = Math.min, a = Math.max, o = 1 / 0;
            if (Ew[i]) {
                var s = o, l = o, u = -o, h = -o, c = [], d = t && t.pixelRatio || 1;
                f(Bw, function (o) {
                    if (o.group === i) {
                        var d = e ? o.getZr().painter.getSvgDom().innerHTML : o.getRenderedCanvas(n(t)),
                            f = o.getDom().getBoundingClientRect();
                        s = r(f.left, s), l = r(f.top, l), u = a(f.right, u), h = a(f.bottom, h), c.push({
                            dom: d,
                            left: f.left,
                            top: f.top
                        })
                    }
                }), s *= d, l *= d, u *= d, h *= d;
                var p = u - s, g = h - l, m = ig(), v = jn(m, {renderer: e ? "svg" : "canvas"});
                if (v.resize({width: p, height: g}), e) {
                    var y = "";
                    return iw(c, function (t) {
                        var e = t.left - s, i = t.top - l;
                        y += '<g transform="translate(' + e + "," + i + ')">' + t.dom + "</g>"
                    }), v.painter.getSvgRoot().innerHTML = y, t.connectedBackgroundColor && v.painter.setBackgroundColor(t.connectedBackgroundColor), v.refreshImmediately(), v.painter.toDataURL()
                }
                return t.connectedBackgroundColor && v.add(new Ly({
                    shape: {x: 0, y: 0, width: p, height: g},
                    style: {fill: t.connectedBackgroundColor}
                })), iw(c, function (t) {
                    var e = new Tn({style: {x: t.left * d - s, y: t.top * d - l, image: t.dom}});
                    v.add(e)
                }), v.refreshImmediately(), m.toDataURL("image/" + (t && t.type || "png"))
            }
            return this.getDataURL(t)
        }
    }, Mw.convertToPixel = x(Ul, "convertToPixel"), Mw.convertFromPixel = x(Ul, "convertFromPixel"), Mw.containPixel = function (t, e) {
        if (!this._disposed) {
            var i, n = this._model;
            return t = ur(n, t), f(t, function (t, n) {
                n.indexOf("Models") >= 0 && f(t, function (t) {
                    var r = t.coordinateSystem;
                    if (r && r.containPoint) i |= !!r.containPoint(e); else if ("seriesModels" === n) {
                        var a = this._chartsMap[t.__viewId];
                        a && a.containPoint && (i |= a.containPoint(e, t))
                    }
                }, this)
            }, this), !!i
        }
    }, Mw.getVisual = function (t, e) {
        var i = this._model;
        t = ur(i, t, {defaultMainType: "series"});
        var n = t.seriesModel, r = n.getData(),
            a = t.hasOwnProperty("dataIndexInside") ? t.dataIndexInside : t.hasOwnProperty("dataIndex") ? r.indexOfRawIndex(t.dataIndex) : null;
        return null != a ? r.getItemVisual(a, e) : r.getVisual(e)
    }, Mw.getViewOfComponentModel = function (t) {
        return this._componentsMap[t.__viewId]
    }, Mw.getViewOfSeriesModel = function (t) {
        return this._chartsMap[t.__viewId]
    };
    var Iw = {
        prepareAndUpdate: function (t) {
            Yl(this), Iw.update.call(this, t)
        }, update: function (t) {
            var e = this._model, i = this._api, n = this._zr, r = this._coordSysMgr, a = this._scheduler;
            if (e) {
                a.restoreData(e, t), a.performSeriesTasks(e), r.create(e, i), a.performDataProcessorTasks(e, t), jl(this, e), r.update(e, i), tu(e), a.performVisualTasks(e, t), eu(this, e, i, t);
                var o = e.get("backgroundColor") || "transparent";
                if (Up.canvasSupported) n.setBackgroundColor(o); else {
                    var s = Je(o);
                    o = li(s, "rgb"), 0 === s[3] && (o = "transparent")
                }
                ru(e, i)
            }
        }, updateTransform: function (t) {
            var e = this._model, i = this, n = this._api;
            if (e) {
                var r = [];
                e.eachComponent(function (a, o) {
                    var s = i.getViewOfComponentModel(o);
                    if (s && s.__alive) if (s.updateTransform) {
                        var l = s.updateTransform(o, e, n, t);
                        l && l.update && r.push(s)
                    } else r.push(s)
                });
                var a = R();
                e.eachSeries(function (r) {
                    var o = i._chartsMap[r.__viewId];
                    if (o.updateTransform) {
                        var s = o.updateTransform(r, e, n, t);
                        s && s.update && a.set(r.uid, 1)
                    } else a.set(r.uid, 1)
                }), tu(e), this._scheduler.performVisualTasks(e, t, {
                    setDirty: !0,
                    dirtyMap: a
                }), nu(i, e, n, t, a), ru(e, this._api)
            }
        }, updateView: function (t) {
            var e = this._model;
            e && (hl.markUpdateMethod(t, "updateView"), tu(e), this._scheduler.performVisualTasks(e, t, {setDirty: !0}), eu(this, this._model, this._api, t), ru(e, this._api))
        }, updateVisual: function (t) {
            Iw.update.call(this, t)
        }, updateLayout: function (t) {
            Iw.update.call(this, t)
        }
    };
    Mw.resize = function (t) {
        if (!this._disposed) {
            this._zr.resize(t);
            var e = this._model;
            if (this._loadingFX && this._loadingFX.resize(), e) {
                var i = e.resetOption("media"), n = t && t.silent;
                this[ww] = !0, i && Yl(this), Iw.update.call(this), this[ww] = !1, Kl.call(this, n), $l.call(this, n)
            }
        }
    }, Mw.showLoading = function (t, e) {
        if (!this._disposed && (rw(t) && (e = t, t = ""), t = t || "default", this.hideLoading(), zw[t])) {
            var i = zw[t](this._api, e), n = this._zr;
            this._loadingFX = i, n.add(i)
        }
    }, Mw.hideLoading = function () {
        this._disposed || (this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null)
    }, Mw.makeActionFromEvent = function (t) {
        var e = o({}, t);
        return e.type = Dw[t.type], e
    }, Mw.dispatchAction = function (t, e) {
        if (!this._disposed && (rw(e) || (e = {silent: !!e}), Tw[t.type] && this._model)) {
            if (this[ww]) return void this._pendingActions.push(t);
            Zl.call(this, t, e.silent), e.flush ? this._zr.flush(!0) : e.flush !== !1 && Up.browser.weChat && this._throttledZrFlush(), Kl.call(this, e.silent), $l.call(this, e.silent)
        }
    }, Mw.appendData = function (t) {
        if (!this._disposed) {
            var e = t.seriesIndex, i = this.getModel(), n = i.getSeriesByIndex(e);
            n.appendData(t), this._scheduler.unfinished = !0
        }
    }, Mw.on = Hl("on", !1), Mw.off = Hl("off", !1), Mw.one = Hl("one", !1);
    var Cw = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"];
    Mw._initEvents = function () {
        iw(Cw, function (t) {
            var e = function (e) {
                var i, n = this.getModel(), r = e.target, a = "globalout" === t;
                if (a) i = {}; else if (r && null != r.dataIndex) {
                    var s = r.dataModel || n.getSeriesByIndex(r.seriesIndex);
                    i = s && s.getDataParams(r.dataIndex, r.dataType, r) || {}
                } else r && r.eventData && (i = o({}, r.eventData));
                if (i) {
                    var l = i.componentType, u = i.componentIndex;
                    ("markLine" === l || "markPoint" === l || "markArea" === l) && (l = "series", u = i.seriesIndex);
                    var h = l && null != u && n.getComponent(l, u),
                        c = h && this["series" === h.mainType ? "_chartsMap" : "_componentsMap"][h.__viewId];
                    i.event = e, i.type = t, this._ecEventProcessor.eventInfo = {
                        targetEl: r,
                        packedEvent: i,
                        model: h,
                        view: c
                    }, this.trigger(t, i)
                }
            };
            e.zrEventfulCallAtLast = !0, this._zr.on(t, e, this)
        }, this), iw(Dw, function (t, e) {
            this._messageCenter.on(e, function (t) {
                this.trigger(e, t)
            }, this)
        }, this)
    }, Mw.isDisposed = function () {
        return this._disposed
    }, Mw.clear = function () {
        this._disposed || this.setOption({series: []}, !0)
    }, Mw.dispose = function () {
        if (!this._disposed) {
            this._disposed = !0, cr(this.getDom(), Fw, "");
            var t = this._api, e = this._model;
            iw(this._componentsViews, function (i) {
                i.dispose(e, t)
            }), iw(this._chartsViews, function (i) {
                i.dispose(e, t)
            }), this._zr.dispose(), delete Bw[this.id]
        }
    }, c(Xl, fg), uu.prototype = {
        constructor: uu, normalizeQuery: function (t) {
            var e = {}, i = {}, n = {};
            if (b(t)) {
                var r = aw(t);
                e.mainType = r.main || null, e.subType = r.sub || null
            } else {
                var a = ["Index", "Name", "Id"], o = {name: 1, dataIndex: 1, dataType: 1};
                f(t, function (t, r) {
                    for (var s = !1, l = 0; l < a.length; l++) {
                        var u = a[l], h = r.lastIndexOf(u);
                        if (h > 0 && h === r.length - u.length) {
                            var c = r.slice(0, h);
                            "data" !== c && (e.mainType = c, e[u.toLowerCase()] = t, s = !0)
                        }
                    }
                    o.hasOwnProperty(r) && (i[r] = t, s = !0), s || (n[r] = t)
                })
            }
            return {cptQuery: e, dataQuery: i, otherQuery: n}
        }, filter: function (t, e) {
            function i(t, e, i, n) {
                return null == t[i] || e[n || i] === t[i]
            }

            var n = this.eventInfo;
            if (!n) return !0;
            var r = n.targetEl, a = n.packedEvent, o = n.model, s = n.view;
            if (!o || !s) return !0;
            var l = e.cptQuery, u = e.dataQuery;
            return i(l, o, "mainType") && i(l, o, "subType") && i(l, o, "index", "componentIndex") && i(l, o, "name") && i(l, o, "id") && i(u, a, "name") && i(u, a, "dataIndex") && i(u, a, "dataType") && (!s.filterForExposedEvent || s.filterForExposedEvent(t, e.otherQuery, r, a))
        }, afterTrigger: function () {
            this.eventInfo = null
        }
    };
    var Tw = {}, Dw = {}, Aw = [], kw = [], Pw = [], Lw = [], Ow = {}, zw = {}, Bw = {}, Ew = {}, Nw = new Date - 0,
        Rw = new Date - 0, Fw = "_echarts_instance_", Vw = fu;
    Iu(gw, T_), yu(a_), xu(cw, o_), Tu("default", P_), wu({
        type: "highlight",
        event: "highlight",
        update: "highlight"
    }, V), wu({type: "downplay", event: "downplay", update: "downplay"}, V), vu("light", F_), vu("dark", W_);
    var Gw = {};
    Eu.prototype = {
        constructor: Eu, add: function (t) {
            return this._add = t, this
        }, update: function (t) {
            return this._update = t, this
        }, remove: function (t) {
            return this._remove = t, this
        }, execute: function () {
            var t, e = this._old, i = this._new, n = {}, r = {}, a = [], o = [];
            for (Nu(e, n, a, "_oldKeyGetter", this), Nu(i, r, o, "_newKeyGetter", this), t = 0; t < e.length; t++) {
                var s = a[t], l = r[s];
                if (null != l) {
                    var u = l.length;
                    u ? (1 === u && (r[s] = null), l = l.shift()) : r[s] = null, this._update && this._update(l, t)
                } else this._remove && this._remove(t)
            }
            for (var t = 0; t < o.length; t++) {
                var s = o[t];
                if (r.hasOwnProperty(s)) {
                    var l = r[s];
                    if (null == l) continue;
                    if (l.length) for (var h = 0, u = l.length; u > h; h++) this._add && this._add(l[h]); else this._add && this._add(l)
                }
            }
        }
    };
    var Hw = R(["tooltip", "label", "itemName", "itemId", "seriesName"]), Ww = S, Xw = "undefined", Uw = -1,
        Yw = "e\x00\x00", qw = {
            "float": typeof Float64Array === Xw ? Array : Float64Array,
            "int": typeof Int32Array === Xw ? Array : Int32Array,
            ordinal: Array,
            number: Array,
            time: Array
        }, jw = typeof Uint32Array === Xw ? Array : Uint32Array, Zw = typeof Int32Array === Xw ? Array : Int32Array,
        Kw = typeof Uint16Array === Xw ? Array : Uint16Array,
        $w = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_rawData", "_chunkSize", "_chunkCount", "_dimValueGetter", "_count", "_rawCount", "_nameDimIdx", "_idDimIdx"],
        Qw = ["_extent", "_approximateExtent", "_rawExtent"], Jw = function (t, e) {
            t = t || ["x", "y"];
            for (var i = {}, n = [], r = {}, a = 0; a < t.length; a++) {
                var o = t[a];
                b(o) ? o = new Hu({name: o}) : o instanceof Hu || (o = new Hu(o));
                var s = o.name;
                o.type = o.type || "float", o.coordDim || (o.coordDim = s, o.coordDimIndex = 0), o.otherDims = o.otherDims || {}, n.push(s), i[s] = o, o.index = a, o.createInvertedIndices && (r[s] = [])
            }
            this.dimensions = n, this._dimensionInfos = i, this.hostModel = e, this.dataType, this._indices = null, this._count = 0, this._rawCount = 0, this._storage = {}, this._nameList = [], this._idList = [], this._optionModels = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this.hasItemVisual = {}, this._itemLayouts = [], this._graphicEls = [], this._chunkSize = 1e5, this._chunkCount = 0, this._rawData, this._rawExtent = {}, this._extent = {}, this._approximateExtent = {}, this._dimensionsSummary = Ru(this), this._invertedIndicesMap = r, this._calculationInfo = {}, this.userOutput = this._dimensionsSummary.userOutput
        }, tb = Jw.prototype;
    tb.type = "list", tb.hasItemOption = !0, tb.getDimension = function (t) {
        return ("number" == typeof t || !isNaN(t) && !this._dimensionInfos.hasOwnProperty(t)) && (t = this.dimensions[t]), t
    }, tb.getDimensionInfo = function (t) {
        return this._dimensionInfos[this.getDimension(t)]
    }, tb.getDimensionsOnCoord = function () {
        return this._dimensionsSummary.dataDimsOnCoord.slice()
    }, tb.mapDimension = function (t, e) {
        var i = this._dimensionsSummary;
        if (null == e) return i.encodeFirstDimNotExtra[t];
        var n = i.encode[t];
        return e === !0 ? (n || []).slice() : n && n[e]
    }, tb.initData = function (t, e, i) {
        var n = is.isInstance(t) || d(t);
        n && (t = new Ws(t, this.dimensions.length)), this._rawData = t, this._storage = {}, this._indices = null, this._nameList = e || [], this._idList = [], this._nameRepeatCount = {}, i || (this.hasItemOption = !1), this.defaultDimValueGetter = h_[this._rawData.getSource().sourceFormat], this._dimValueGetter = i = i || this.defaultDimValueGetter, this._dimValueGetterArrayRows = h_.arrayRows, this._rawExtent = {}, this._initDataFromProvider(0, t.count()), t.pure && (this.hasItemOption = !1)
    }, tb.getProvider = function () {
        return this._rawData
    }, tb.appendData = function (t) {
        var e = this._rawData, i = this.count();
        e.appendData(t);
        var n = e.count();
        e.persistent || (n += i), this._initDataFromProvider(i, n)
    }, tb.appendValues = function (t, e) {
        for (var i = this._chunkSize, n = this._storage, r = this.dimensions, a = r.length, o = this._rawExtent, s = this.count(), l = s + Math.max(t.length, e ? e.length : 0), u = this._chunkCount, h = 0; a > h; h++) {
            var c = r[h];
            o[c] || (o[c] = eh()), n[c] || (n[c] = []), Yu(n, this._dimensionInfos[c], i, u, l), this._chunkCount = n[c].length
        }
        for (var d = new Array(a), f = s; l > f; f++) {
            for (var p = f - s, g = Math.floor(f / i), m = f % i, v = 0; a > v; v++) {
                var c = r[v], y = this._dimValueGetterArrayRows(t[p] || d, c, p, v);
                n[c][g][m] = y;
                var x = o[c];
                y < x[0] && (x[0] = y), y > x[1] && (x[1] = y)
            }
            e && (this._nameList[f] = e[p])
        }
        this._rawCount = this._count = l, this._extent = {}, qu(this)
    }, tb._initDataFromProvider = function (t, e) {
        if (!(t >= e)) {
            for (var i, n = this._chunkSize, r = this._rawData, a = this._storage, o = this.dimensions, s = o.length, l = this._dimensionInfos, u = this._nameList, h = this._idList, c = this._rawExtent, d = this._nameRepeatCount = {}, f = this._chunkCount, p = 0; s > p; p++) {
                var g = o[p];
                c[g] || (c[g] = eh());
                var m = l[g];
                0 === m.otherDims.itemName && (i = this._nameDimIdx = p), 0 === m.otherDims.itemId && (this._idDimIdx = p), a[g] || (a[g] = []), Yu(a, m, n, f, e), this._chunkCount = a[g].length
            }
            for (var v = new Array(s), y = t; e > y; y++) {
                v = r.getItem(y, v);
                for (var x = Math.floor(y / n), _ = y % n, w = 0; s > w; w++) {
                    var g = o[w], b = a[g][x], S = this._dimValueGetter(v, g, y, w);
                    b[_] = S;
                    var M = c[g];
                    S < M[0] && (M[0] = S), S > M[1] && (M[1] = S)
                }
                if (!r.pure) {
                    var I = u[y];
                    if (v && null == I) if (null != v.name) u[y] = I = v.name; else if (null != i) {
                        var C = o[i], T = a[C][x];
                        if (T) {
                            I = T[_];
                            var D = l[C].ordinalMeta;
                            D && D.categories.length && (I = D.categories[I])
                        }
                    }
                    var A = null == v ? null : v.id;
                    null == A && null != I && (d[I] = d[I] || 0, A = I, d[I] > 0 && (A += "__ec__" + d[I]), d[I]++), null != A && (h[y] = A)
                }
            }
            !r.persistent && r.clean && r.clean(), this._rawCount = this._count = e, this._extent = {}, qu(this)
        }
    }, tb.count = function () {
        return this._count
    }, tb.getIndices = function () {
        var t, e = this._indices;
        if (e) {
            var i = e.constructor, n = this._count;
            if (i === Array) {
                t = new i(n);
                for (var r = 0; n > r; r++) t[r] = e[r]
            } else t = new i(e.buffer, 0, n)
        } else for (var i = Wu(this), t = new i(this.count()), r = 0; r < t.length; r++) t[r] = r;
        return t
    }, tb.get = function (t, e) {
        if (!(e >= 0 && e < this._count)) return 0 / 0;
        var i = this._storage;
        if (!i[t]) return 0 / 0;
        e = this.getRawIndex(e);
        var n = Math.floor(e / this._chunkSize), r = e % this._chunkSize, a = i[t][n], o = a[r];
        return o
    }, tb.getByRawIndex = function (t, e) {
        if (!(e >= 0 && e < this._rawCount)) return 0 / 0;
        var i = this._storage[t];
        if (!i) return 0 / 0;
        var n = Math.floor(e / this._chunkSize), r = e % this._chunkSize, a = i[n];
        return a[r]
    }, tb._getFast = function (t, e) {
        var i = Math.floor(e / this._chunkSize), n = e % this._chunkSize, r = this._storage[t][i];
        return r[n]
    }, tb.getValues = function (t, e) {
        var i = [];
        _(t) || (e = t, t = this.dimensions);
        for (var n = 0, r = t.length; r > n; n++) i.push(this.get(t[n], e));
        return i
    }, tb.hasValue = function (t) {
        for (var e = this._dimensionsSummary.dataDimsOnCoord, i = 0, n = e.length; n > i; i++) if (isNaN(this.get(e[i], t))) return !1;
        return !0
    }, tb.getDataExtent = function (t) {
        t = this.getDimension(t);
        var e = this._storage[t], i = eh();
        if (!e) return i;
        var n, r = this.count(), a = !this._indices;
        if (a) return this._rawExtent[t].slice();
        if (n = this._extent[t]) return n.slice();
        n = i;
        for (var o = n[0], s = n[1], l = 0; r > l; l++) {
            var u = this._getFast(t, this.getRawIndex(l));
            o > u && (o = u), u > s && (s = u)
        }
        return n = [o, s], this._extent[t] = n, n
    }, tb.getApproximateExtent = function (t) {
        return t = this.getDimension(t), this._approximateExtent[t] || this.getDataExtent(t)
    }, tb.setApproximateExtent = function (t, e) {
        e = this.getDimension(e), this._approximateExtent[e] = t.slice()
    }, tb.getCalculationInfo = function (t) {
        return this._calculationInfo[t]
    }, tb.setCalculationInfo = function (t, e) {
        Ww(t) ? o(this._calculationInfo, t) : this._calculationInfo[t] = e
    }, tb.getSum = function (t) {
        var e = this._storage[t], i = 0;
        if (e) for (var n = 0, r = this.count(); r > n; n++) {
            var a = this.get(t, n);
            isNaN(a) || (i += a)
        }
        return i
    }, tb.getMedian = function (t) {
        var e = [];
        this.each(t, function (t) {
            isNaN(t) || e.push(t)
        });
        var i = [].concat(e).sort(function (t, e) {
            return t - e
        }), n = this.count();
        return 0 === n ? 0 : n % 2 === 1 ? i[(n - 1) / 2] : (i[n / 2] + i[n / 2 - 1]) / 2
    }, tb.rawIndexOf = function (t, e) {
        var i = t && this._invertedIndicesMap[t], n = i[e];
        return null == n || isNaN(n) ? Uw : n
    }, tb.indexOfName = function (t) {
        for (var e = 0, i = this.count(); i > e; e++) if (this.getName(e) === t) return e;
        return -1
    }, tb.indexOfRawIndex = function (t) {
        if (t >= this._rawCount || 0 > t) return -1;
        if (!this._indices) return t;
        var e = this._indices, i = e[t];
        if (null != i && i < this._count && i === t) return t;
        for (var n = 0, r = this._count - 1; r >= n;) {
            var a = (n + r) / 2 | 0;
            if (e[a] < t) n = a + 1; else {
                if (!(e[a] > t)) return a;
                r = a - 1
            }
        }
        return -1
    }, tb.indicesOfNearest = function (t, e, i) {
        var n = this._storage, r = n[t], a = [];
        if (!r) return a;
        null == i && (i = 1 / 0);
        for (var o = 1 / 0, s = -1, l = 0, u = 0, h = this.count(); h > u; u++) {
            var c = e - this.get(t, u), d = Math.abs(c);
            i >= d && ((o > d || d === o && c >= 0 && 0 > s) && (o = d, s = c, l = 0), c === s && (a[l++] = u))
        }
        return a.length = l, a
    }, tb.getRawIndex = Zu, tb.getRawDataItem = function (t) {
        if (this._rawData.persistent) return this._rawData.getItem(this.getRawIndex(t));
        for (var e = [], i = 0; i < this.dimensions.length; i++) {
            var n = this.dimensions[i];
            e.push(this.get(n, t))
        }
        return e
    }, tb.getName = function (t) {
        var e = this.getRawIndex(t);
        return this._nameList[e] || ju(this, this._nameDimIdx, e) || ""
    }, tb.getId = function (t) {
        return $u(this, this.getRawIndex(t))
    }, tb.each = function (t, e, i, n) {
        if (this._count) {
            "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this, t = p(Qu(t), this.getDimension, this);
            for (var r = t.length, a = 0; a < this.count(); a++) switch (r) {
                case 0:
                    e.call(i, a);
                    break;
                case 1:
                    e.call(i, this.get(t[0], a), a);
                    break;
                case 2:
                    e.call(i, this.get(t[0], a), this.get(t[1], a), a);
                    break;
                default:
                    for (var o = 0, s = []; r > o; o++) s[o] = this.get(t[o], a);
                    s[o] = a, e.apply(i, s)
            }
        }
    }, tb.filterSelf = function (t, e, i, n) {
        if (this._count) {
            "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this, t = p(Qu(t), this.getDimension, this);
            for (var r = this.count(), a = Wu(this), o = new a(r), s = [], l = t.length, u = 0, h = t[0], c = 0; r > c; c++) {
                var d, f = this.getRawIndex(c);
                if (0 === l) d = e.call(i, c); else if (1 === l) {
                    var g = this._getFast(h, f);
                    d = e.call(i, g, c)
                } else {
                    for (var m = 0; l > m; m++) s[m] = this._getFast(h, f);
                    s[m] = c, d = e.apply(i, s)
                }
                d && (o[u++] = f)
            }
            return r > u && (this._indices = o), this._count = u, this._extent = {}, this.getRawIndex = this._indices ? Ku : Zu, this
        }
    }, tb.selectRange = function (t) {
        if (this._count) {
            var e = [];
            for (var i in t) t.hasOwnProperty(i) && e.push(i);
            var n = e.length;
            if (n) {
                var r = this.count(), a = Wu(this), o = new a(r), s = 0, l = e[0], u = t[l][0], h = t[l][1], c = !1;
                if (!this._indices) {
                    var d = 0;
                    if (1 === n) {
                        for (var f = this._storage[e[0]], p = 0; p < this._chunkCount; p++) for (var g = f[p], m = Math.min(this._count - p * this._chunkSize, this._chunkSize), v = 0; m > v; v++) {
                            var y = g[v];
                            (y >= u && h >= y || isNaN(y)) && (o[s++] = d), d++
                        }
                        c = !0
                    } else if (2 === n) {
                        for (var f = this._storage[l], x = this._storage[e[1]], _ = t[e[1]][0], w = t[e[1]][1], p = 0; p < this._chunkCount; p++) for (var g = f[p], b = x[p], m = Math.min(this._count - p * this._chunkSize, this._chunkSize), v = 0; m > v; v++) {
                            var y = g[v], S = b[v];
                            (y >= u && h >= y || isNaN(y)) && (S >= _ && w >= S || isNaN(S)) && (o[s++] = d), d++
                        }
                        c = !0
                    }
                }
                if (!c) if (1 === n) for (var v = 0; r > v; v++) {
                    var M = this.getRawIndex(v), y = this._getFast(l, M);
                    (y >= u && h >= y || isNaN(y)) && (o[s++] = M)
                } else for (var v = 0; r > v; v++) {
                    for (var I = !0, M = this.getRawIndex(v), p = 0; n > p; p++) {
                        var C = e[p], y = this._getFast(i, M);
                        (y < t[C][0] || y > t[C][1]) && (I = !1)
                    }
                    I && (o[s++] = this.getRawIndex(v))
                }
                return r > s && (this._indices = o), this._count = s, this._extent = {}, this.getRawIndex = this._indices ? Ku : Zu, this
            }
        }
    }, tb.mapArray = function (t, e, i, n) {
        "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this;
        var r = [];
        return this.each(t, function () {
            r.push(e && e.apply(this, arguments))
        }, i), r
    }, tb.map = function (t, e, i, n) {
        i = i || n || this, t = p(Qu(t), this.getDimension, this);
        var r = Ju(this, t);
        r._indices = this._indices, r.getRawIndex = r._indices ? Ku : Zu;
        for (var a = r._storage, o = [], s = this._chunkSize, l = t.length, u = this.count(), h = [], c = r._rawExtent, d = 0; u > d; d++) {
            for (var f = 0; l > f; f++) h[f] = this.get(t[f], d);
            h[l] = d;
            var g = e && e.apply(i, h);
            if (null != g) {
                "object" != typeof g && (o[0] = g, g = o);
                for (var m = this.getRawIndex(d), v = Math.floor(m / s), y = m % s, x = 0; x < g.length; x++) {
                    var _ = t[x], w = g[x], b = c[_], S = a[_];
                    S && (S[v][y] = w), w < b[0] && (b[0] = w), w > b[1] && (b[1] = w)
                }
            }
        }
        return r
    }, tb.downSample = function (t, e, i, n) {
        for (var r = Ju(this, [t]), a = r._storage, o = [], s = Math.floor(1 / e), l = a[t], u = this.count(), h = this._chunkSize, c = r._rawExtent[t], d = new (Wu(this))(u), f = 0, p = 0; u > p; p += s) {
            s > u - p && (s = u - p, o.length = s);
            for (var g = 0; s > g; g++) {
                var m = this.getRawIndex(p + g), v = Math.floor(m / h), y = m % h;
                o[g] = l[v][y]
            }
            var x = i(o), _ = this.getRawIndex(Math.min(p + n(o, x) || 0, u - 1)), w = Math.floor(_ / h), b = _ % h;
            l[w][b] = x, x < c[0] && (c[0] = x), x > c[1] && (c[1] = x), d[f++] = _
        }
        return r._count = f, r._indices = d, r.getRawIndex = Ku, r
    }, tb.getItemModel = function (t) {
        var e = this.hostModel;
        return new fo(this.getRawDataItem(t), e, e && e.ecModel)
    }, tb.diff = function (t) {
        var e = this;
        return new Eu(t ? t.getIndices() : [], this.getIndices(), function (e) {
            return $u(t, e)
        }, function (t) {
            return $u(e, t)
        })
    }, tb.getVisual = function (t) {
        var e = this._visual;
        return e && e[t]
    }, tb.setVisual = function (t, e) {
        if (Ww(t)) for (var i in t) t.hasOwnProperty(i) && this.setVisual(i, t[i]); else this._visual = this._visual || {}, this._visual[t] = e
    }, tb.setLayout = function (t, e) {
        if (Ww(t)) for (var i in t) t.hasOwnProperty(i) && this.setLayout(i, t[i]); else this._layout[t] = e
    }, tb.getLayout = function (t) {
        return this._layout[t]
    }, tb.getItemLayout = function (t) {
        return this._itemLayouts[t]
    }, tb.setItemLayout = function (t, e, i) {
        this._itemLayouts[t] = i ? o(this._itemLayouts[t] || {}, e) : e
    }, tb.clearItemLayouts = function () {
        this._itemLayouts.length = 0
    }, tb.getItemVisual = function (t, e, i) {
        var n = this._itemVisuals[t], r = n && n[e];
        return null != r || i ? r : this.getVisual(e)
    }, tb.setItemVisual = function (t, e, i) {
        var n = this._itemVisuals[t] || {}, r = this.hasItemVisual;
        if (this._itemVisuals[t] = n, Ww(e)) for (var a in e) e.hasOwnProperty(a) && (n[a] = e[a], r[a] = !0); else n[e] = i, r[e] = !0
    }, tb.clearAllVisual = function () {
        this._visual = {}, this._itemVisuals = [], this.hasItemVisual = {}
    };
    var eb = function (t) {
        t.seriesIndex = this.seriesIndex, t.dataIndex = this.dataIndex, t.dataType = this.dataType
    };
    tb.setItemGraphicEl = function (t, e) {
        var i = this.hostModel;
        e && (e.dataIndex = t, e.dataType = this.dataType, e.seriesIndex = i && i.seriesIndex, "group" === e.type && e.traverse(eb, e)), this._graphicEls[t] = e
    }, tb.getItemGraphicEl = function (t) {
        return this._graphicEls[t]
    }, tb.eachItemGraphicEl = function (t, e) {
        f(this._graphicEls, function (i, n) {
            i && t && t.call(e, i, n)
        })
    }, tb.cloneShallow = function (t) {
        if (!t) {
            var e = p(this.dimensions, this.getDimensionInfo, this);
            t = new Jw(e, this.hostModel)
        }
        if (t._storage = this._storage, Uu(t, this), this._indices) {
            var i = this._indices.constructor;
            t._indices = new i(this._indices)
        } else t._indices = null;
        return t.getRawIndex = t._indices ? Ku : Zu, t
    }, tb.wrapMethod = function (t, e) {
        var i = this[t];
        "function" == typeof i && (this.__wrappedMethods = this.__wrappedMethods || [], this.__wrappedMethods.push(t), this[t] = function () {
            var t = i.apply(this, arguments);
            return e.apply(this, [t].concat(P(arguments)))
        })
    }, tb.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "map"], tb.CHANGABLE_METHODS = ["filterSelf", "selectRange"];
    var ib = function (t, e) {
        return e = e || {}, ih(e.coordDimensions || [], t, {
            dimsDef: e.dimensionsDefine || t.dimensionsDefine,
            encodeDef: e.encodeDefine || t.encodeDefine,
            dimCount: e.dimensionsCount,
            encodeDefaulter: e.encodeDefaulter,
            generateCoord: e.generateCoord,
            generateCoordCount: e.generateCoordCount
        })
    }, nb = {
        cartesian2d: function (t, e, i, n) {
            var r = t.getReferringComponents("xAxis")[0], a = t.getReferringComponents("yAxis")[0];
            e.coordSysDims = ["x", "y"], i.set("x", r), i.set("y", a), sh(r) && (n.set("x", r), e.firstCategoryDimIndex = 0), sh(a) && (n.set("y", a), null == e.firstCategoryDimIndex & (e.firstCategoryDimIndex = 1))
        }, singleAxis: function (t, e, i, n) {
            var r = t.getReferringComponents("singleAxis")[0];
            e.coordSysDims = ["single"], i.set("single", r), sh(r) && (n.set("single", r), e.firstCategoryDimIndex = 0)
        }, polar: function (t, e, i, n) {
            var r = t.getReferringComponents("polar")[0], a = r.findAxisModel("radiusAxis"),
                o = r.findAxisModel("angleAxis");
            e.coordSysDims = ["radius", "angle"], i.set("radius", a), i.set("angle", o), sh(a) && (n.set("radius", a), e.firstCategoryDimIndex = 0), sh(o) && (n.set("angle", o), null == e.firstCategoryDimIndex && (e.firstCategoryDimIndex = 1))
        }, geo: function (t, e) {
            e.coordSysDims = ["lng", "lat"]
        }, parallel: function (t, e, i, n) {
            var r = t.ecModel, a = r.getComponent("parallel", t.get("parallelIndex")),
                o = e.coordSysDims = a.dimensions.slice();
            f(a.parallelAxisIndex, function (t, a) {
                var s = r.getComponent("parallelAxis", t), l = o[a];
                i.set(l, s), sh(s) && null == e.firstCategoryDimIndex && (n.set(l, s), e.firstCategoryDimIndex = a)
            })
        }
    };
    ph.prototype.parse = function (t) {
        return t
    }, ph.prototype.getSetting = function (t) {
        return this._setting[t]
    }, ph.prototype.contain = function (t) {
        var e = this._extent;
        return t >= e[0] && t <= e[1]
    }, ph.prototype.normalize = function (t) {
        var e = this._extent;
        return e[1] === e[0] ? .5 : (t - e[0]) / (e[1] - e[0])
    }, ph.prototype.scale = function (t) {
        var e = this._extent;
        return t * (e[1] - e[0]) + e[0]
    }, ph.prototype.unionExtent = function (t) {
        var e = this._extent;
        t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1])
    }, ph.prototype.unionExtentFromData = function (t, e) {
        this.unionExtent(t.getApproximateExtent(e))
    }, ph.prototype.getExtent = function () {
        return this._extent.slice()
    }, ph.prototype.setExtent = function (t, e) {
        var i = this._extent;
        isNaN(t) || (i[0] = t), isNaN(e) || (i[1] = e)
    }, ph.prototype.isBlank = function () {
        return this._isBlank
    }, ph.prototype.setBlank = function (t) {
        this._isBlank = t
    }, ph.prototype.getLabel = null, mr(ph), _r(ph, {registerWhenExtend: !0}), gh.createByAxisModel = function (t) {
        var e = t.option, i = e.data, n = i && p(i, vh);
        return new gh({categories: n, needCollect: !n, deduplication: e.dedplication !== !1})
    };
    var rb = gh.prototype;
    rb.getOrdinal = function (t) {
        return mh(this).get(t)
    }, rb.parseAndCollect = function (t) {
        var e, i = this._needCollect;
        if ("string" != typeof t && !i) return t;
        if (i && !this._deduplication) return e = this.categories.length, this.categories[e] = t, e;
        var n = mh(this);
        return e = n.get(t), null == e && (i ? (e = this.categories.length, this.categories[e] = t, n.set(t, e)) : e = 0 / 0), e
    };
    var ab = ph.prototype, ob = ph.extend({
        type: "ordinal", init: function (t, e) {
            (!t || _(t)) && (t = new gh({categories: t})), this._ordinalMeta = t, this._extent = e || [0, t.categories.length - 1]
        }, parse: function (t) {
            return "string" == typeof t ? this._ordinalMeta.getOrdinal(t) : Math.round(t)
        }, contain: function (t) {
            return t = this.parse(t), ab.contain.call(this, t) && null != this._ordinalMeta.categories[t]
        }, normalize: function (t) {
            return ab.normalize.call(this, this.parse(t))
        }, scale: function (t) {
            return Math.round(ab.scale.call(this, t))
        }, getTicks: function () {
            for (var t = [], e = this._extent, i = e[0]; i <= e[1];) t.push(i), i++;
            return t
        }, getLabel: function (t) {
            return this.isBlank() ? void 0 : this._ordinalMeta.categories[t]
        }, count: function () {
            return this._extent[1] - this._extent[0] + 1
        }, unionExtentFromData: function (t, e) {
            this.unionExtent(t.getApproximateExtent(e))
        }, getOrdinalMeta: function () {
            return this._ordinalMeta
        }, niceTicks: V, niceExtent: V
    });
    ob.create = function () {
        return new ob
    };
    var sb = bo, lb = bo, ub = ph.extend({
        type: "interval", _interval: 0, _intervalPrecision: 2, setExtent: function (t, e) {
            var i = this._extent;
            isNaN(t) || (i[0] = parseFloat(t)), isNaN(e) || (i[1] = parseFloat(e))
        }, unionExtent: function (t) {
            var e = this._extent;
            t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1]), ub.prototype.setExtent.call(this, e[0], e[1])
        }, getInterval: function () {
            return this._interval
        }, setInterval: function (t) {
            this._interval = t, this._niceExtent = this._extent.slice(), this._intervalPrecision = xh(t)
        }, getTicks: function (t) {
            var e = this._interval, i = this._extent, n = this._niceExtent, r = this._intervalPrecision, a = [];
            if (!e) return a;
            var o = 1e4;
            i[0] < n[0] && a.push(t ? lb(n[0] - e, r) : i[0]);
            for (var s = n[0]; s <= n[1] && (a.push(s), s = lb(s + e, r), s !== a[a.length - 1]);) if (a.length > o) return [];
            var l = a.length ? a[a.length - 1] : n[1];
            return i[1] > l && a.push(t ? lb(l + e, r) : i[1]), a
        }, getMinorTicks: function (t) {
            for (var e = this.getTicks(!0), i = [], n = this.getExtent(), r = 1; r < e.length; r++) {
                for (var a = e[r], o = e[r - 1], s = 0, l = [], u = a - o, h = u / t; t - 1 > s;) {
                    var c = bo(o + (s + 1) * h);
                    c > n[0] && c < n[1] && l.push(c), s++
                }
                i.push(l)
            }
            return i
        }, getLabel: function (t, e) {
            if (null == t) return "";
            var i = e && e.precision;
            return null == i ? i = Io(t) || 0 : "auto" === i && (i = this._intervalPrecision), t = lb(t, i, !0), No(t)
        }, niceTicks: function (t, e, i) {
            t = t || 5;
            var n = this._extent, r = n[1] - n[0];
            if (isFinite(r)) {
                0 > r && (r = -r, n.reverse());
                var a = yh(n, t, e, i);
                this._intervalPrecision = a.intervalPrecision, this._interval = a.interval, this._niceExtent = a.niceTickExtent
            }
        }, niceExtent: function (t) {
            var e = this._extent;
            if (e[0] === e[1]) if (0 !== e[0]) {
                var i = e[0];
                t.fixMax ? e[0] -= i / 2 : (e[1] += i / 2, e[0] -= i / 2)
            } else e[1] = 1;
            var n = e[1] - e[0];
            isFinite(n) || (e[0] = 0, e[1] = 1), this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval);
            var r = this._interval;
            t.fixMin || (e[0] = lb(Math.floor(e[0] / r) * r)), t.fixMax || (e[1] = lb(Math.ceil(e[1] / r) * r))
        }
    });
    ub.create = function () {
        return new ub
    };
    var hb = "__ec_stack_", cb = .5, db = "undefined" != typeof Float32Array ? Float32Array : Array, fb = {
            seriesType: "bar", plan: x_(), reset: function (t) {
                function e(t, e) {
                    for (var i, d = t.count, f = new db(2 * d), p = new db(2 * d), g = new db(d), m = [], v = [], y = 0, x = 0; null != (i = t.next());) v[h] = e.get(s, i), v[1 - h] = e.get(l, i), m = n.dataToPoint(v, null, m), p[y] = u ? r.x + r.width : m[0], f[y++] = m[0], p[y] = u ? m[1] : r.y + r.height, f[y++] = m[1], g[x++] = i;
                    e.setLayout({
                        largePoints: f,
                        largeDataIndices: g,
                        largeBackgroundPoints: p,
                        barWidth: c,
                        valueAxisStart: Lh(a, o, !1),
                        backgroundStart: u ? r.x : r.y,
                        valueAxisHorizontal: u
                    })
                }

                if (kh(t) && Ph(t)) {
                    var i = t.getData(), n = t.coordinateSystem, r = n.grid.getRect(), a = n.getBaseAxis(),
                        o = n.getOtherAxis(a), s = i.mapDimension(o.dim), l = i.mapDimension(a.dim), u = o.isHorizontal(),
                        h = u ? 0 : 1, c = Dh(Ch([t]), a, t).width;
                    return c > cb || (c = cb), {progress: e}
                }
            }
        }, pb = ub.prototype, gb = Math.ceil, mb = Math.floor, vb = 1e3, yb = 60 * vb, xb = 60 * yb, _b = 24 * xb,
        wb = function (t, e, i, n) {
            for (; n > i;) {
                var r = i + n >>> 1;
                t[r][1] < e ? i = r + 1 : n = r
            }
            return i
        }, bb = ub.extend({
            type: "time", getLabel: function (t) {
                var e = this._stepLvl, i = new Date(t);
                return Xo(e[0], i, this.getSetting("useUTC"))
            }, niceExtent: function (t) {
                var e = this._extent;
                if (e[0] === e[1] && (e[0] -= _b, e[1] += _b), e[1] === -1 / 0 && 1 / 0 === e[0]) {
                    var i = new Date;
                    e[1] = +new Date(i.getFullYear(), i.getMonth(), i.getDate()), e[0] = e[1] - _b
                }
                this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval);
                var n = this._interval;
                t.fixMin || (e[0] = bo(mb(e[0] / n) * n)), t.fixMax || (e[1] = bo(gb(e[1] / n) * n))
            }, niceTicks: function (t, e, i) {
                t = t || 10;
                var n = this._extent, r = n[1] - n[0], a = r / t;
                null != e && e > a && (a = e), null != i && a > i && (a = i);
                var o = Sb.length, s = wb(Sb, a, 0, o), l = Sb[Math.min(s, o - 1)], u = l[1];
                if ("year" === l[0]) {
                    var h = r / u, c = Oo(h / t, !0);
                    u *= c
                }
                var d = this.getSetting("useUTC") ? 0 : 60 * new Date(+n[0] || +n[1]).getTimezoneOffset() * 1e3,
                    f = [Math.round(gb((n[0] - d) / u) * u + d), Math.round(mb((n[1] - d) / u) * u + d)];
                wh(f, n), this._stepLvl = l, this._interval = u, this._niceExtent = f
            }, parse: function (t) {
                return +ko(t)
            }
        });
    f(["contain", "normalize"], function (t) {
        bb.prototype[t] = function (e) {
            return pb[t].call(this, this.parse(e))
        }
    });
    var Sb = [["hh:mm:ss", vb], ["hh:mm:ss", 5 * vb], ["hh:mm:ss", 10 * vb], ["hh:mm:ss", 15 * vb], ["hh:mm:ss", 30 * vb], ["hh:mm\nMM-dd", yb], ["hh:mm\nMM-dd", 5 * yb], ["hh:mm\nMM-dd", 10 * yb], ["hh:mm\nMM-dd", 15 * yb], ["hh:mm\nMM-dd", 30 * yb], ["hh:mm\nMM-dd", xb], ["hh:mm\nMM-dd", 2 * xb], ["hh:mm\nMM-dd", 6 * xb], ["hh:mm\nMM-dd", 12 * xb], ["MM-dd\nyyyy", _b], ["MM-dd\nyyyy", 2 * _b], ["MM-dd\nyyyy", 3 * _b], ["MM-dd\nyyyy", 4 * _b], ["MM-dd\nyyyy", 5 * _b], ["MM-dd\nyyyy", 6 * _b], ["week", 7 * _b], ["MM-dd\nyyyy", 10 * _b], ["week", 14 * _b], ["week", 21 * _b], ["month", 31 * _b], ["week", 42 * _b], ["month", 62 * _b], ["week", 70 * _b], ["quarter", 95 * _b], ["month", 31 * _b * 4], ["month", 31 * _b * 5], ["half-year", 380 * _b / 2], ["month", 31 * _b * 8], ["month", 31 * _b * 10], ["year", 380 * _b]];
    bb.create = function (t) {
        return new bb({useUTC: t.ecModel.get("useUTC")})
    };
    var Mb = ph.prototype, Ib = ub.prototype, Cb = Io, Tb = bo, Db = Math.floor, Ab = Math.ceil, kb = Math.pow,
        Pb = Math.log, Lb = ph.extend({
            type: "log", base: 10, $constructor: function () {
                ph.apply(this, arguments), this._originalScale = new ub
            }, getTicks: function (t) {
                var e = this._originalScale, i = this._extent, n = e.getExtent();
                return p(Ib.getTicks.call(this, t), function (t) {
                    var r = bo(kb(this.base, t));
                    return r = t === i[0] && e.__fixMin ? Oh(r, n[0]) : r, r = t === i[1] && e.__fixMax ? Oh(r, n[1]) : r
                }, this)
            }, getMinorTicks: Ib.getMinorTicks, getLabel: Ib.getLabel, scale: function (t) {
                return t = Mb.scale.call(this, t), kb(this.base, t)
            }, setExtent: function (t, e) {
                var i = this.base;
                t = Pb(t) / Pb(i), e = Pb(e) / Pb(i), Ib.setExtent.call(this, t, e)
            }, getExtent: function () {
                var t = this.base, e = Mb.getExtent.call(this);
                e[0] = kb(t, e[0]), e[1] = kb(t, e[1]);
                var i = this._originalScale, n = i.getExtent();
                return i.__fixMin && (e[0] = Oh(e[0], n[0])), i.__fixMax && (e[1] = Oh(e[1], n[1])), e
            }, unionExtent: function (t) {
                this._originalScale.unionExtent(t);
                var e = this.base;
                t[0] = Pb(t[0]) / Pb(e), t[1] = Pb(t[1]) / Pb(e), Mb.unionExtent.call(this, t)
            }, unionExtentFromData: function (t, e) {
                this.unionExtent(t.getApproximateExtent(e))
            }, niceTicks: function (t) {
                t = t || 10;
                var e = this._extent, i = e[1] - e[0];
                if (!(1 / 0 === i || 0 >= i)) {
                    var n = Po(i), r = t / i * n;
                    for (.5 >= r && (n *= 10); !isNaN(n) && Math.abs(n) < 1 && Math.abs(n) > 0;) n *= 10;
                    var a = [bo(Ab(e[0] / n) * n), bo(Db(e[1] / n) * n)];
                    this._interval = n, this._niceExtent = a
                }
            }, niceExtent: function (t) {
                Ib.niceExtent.call(this, t);
                var e = this._originalScale;
                e.__fixMin = t.fixMin, e.__fixMax = t.fixMax
            }
        });
    f(["contain", "normalize"], function (t) {
        Lb.prototype[t] = function (e) {
            return e = Pb(e) / Pb(this.base), Mb[t].call(this, e)
        }
    }), Lb.create = function () {
        return new Lb
    };
    var Ob = {
            getMin: function (t) {
                var e = this.option, i = t || null == e.rangeStart ? e.min : e.rangeStart;
                return this.axis && null != i && "dataMin" !== i && "function" != typeof i && !T(i) && (i = this.axis.scale.parse(i)), i
            }, getMax: function (t) {
                var e = this.option, i = t || null == e.rangeEnd ? e.max : e.rangeEnd;
                return this.axis && null != i && "dataMax" !== i && "function" != typeof i && !T(i) && (i = this.axis.scale.parse(i)), i
            }, getNeedCrossZero: function () {
                var t = this.option;
                return null != t.rangeStart || null != t.rangeEnd ? !1 : !t.scale
            }, getCoordSysModel: V, setRange: function (t, e) {
                this.option.rangeStart = t, this.option.rangeEnd = e
            }, resetRange: function () {
                this.option.rangeStart = this.option.rangeEnd = null
            }
        }, zb = pa({
            type: "triangle", shape: {cx: 0, cy: 0, width: 0, height: 0}, buildPath: function (t, e) {
                var i = e.cx, n = e.cy, r = e.width / 2, a = e.height / 2;
                t.moveTo(i, n - a), t.lineTo(i + r, n + a), t.lineTo(i - r, n + a), t.closePath()
            }
        }), Bb = pa({
            type: "diamond", shape: {cx: 0, cy: 0, width: 0, height: 0}, buildPath: function (t, e) {
                var i = e.cx, n = e.cy, r = e.width / 2, a = e.height / 2;
                t.moveTo(i, n - a), t.lineTo(i + r, n), t.lineTo(i, n + a), t.lineTo(i - r, n), t.closePath()
            }
        }), Eb = pa({
            type: "pin", shape: {x: 0, y: 0, width: 0, height: 0}, buildPath: function (t, e) {
                var i = e.x, n = e.y, r = e.width / 5 * 3, a = Math.max(r, e.height), o = r / 2, s = o * o / (a - o),
                    l = n - a + o + s, u = Math.asin(s / o), h = Math.cos(u) * o, c = Math.sin(u), d = Math.cos(u),
                    f = .6 * o, p = .7 * o;
                t.moveTo(i - h, l + s), t.arc(i, l, o, Math.PI - u, 2 * Math.PI + u), t.bezierCurveTo(i + h - c * f, l + s + d * f, i, n - p, i, n), t.bezierCurveTo(i, n - p, i - h + c * f, l + s + d * f, i - h, l + s), t.closePath()
            }
        }), Nb = pa({
            type: "arrow", shape: {x: 0, y: 0, width: 0, height: 0}, buildPath: function (t, e) {
                var i = e.height, n = e.width, r = e.x, a = e.y, o = n / 3 * 2;
                t.moveTo(r, a), t.lineTo(r + o, a + i), t.lineTo(r, a + i / 4 * 3), t.lineTo(r - o, a + i), t.lineTo(r, a), t.closePath()
            }
        }), Rb = {line: zy, rect: Ly, roundRect: Ly, square: Ly, circle: wy, diamond: Bb, pin: Eb, arrow: Nb, triangle: zb},
        Fb = {
            line: function (t, e, i, n, r) {
                r.x1 = t, r.y1 = e + n / 2, r.x2 = t + i, r.y2 = e + n / 2
            }, rect: function (t, e, i, n, r) {
                r.x = t, r.y = e, r.width = i, r.height = n
            }, roundRect: function (t, e, i, n, r) {
                r.x = t, r.y = e, r.width = i, r.height = n, r.r = Math.min(i, n) / 4
            }, square: function (t, e, i, n, r) {
                var a = Math.min(i, n);
                r.x = t, r.y = e, r.width = a, r.height = a
            }, circle: function (t, e, i, n, r) {
                r.cx = t + i / 2, r.cy = e + n / 2, r.r = Math.min(i, n) / 2
            }, diamond: function (t, e, i, n, r) {
                r.cx = t + i / 2, r.cy = e + n / 2, r.width = i, r.height = n
            }, pin: function (t, e, i, n, r) {
                r.x = t + i / 2, r.y = e + n / 2, r.width = i, r.height = n
            }, arrow: function (t, e, i, n, r) {
                r.x = t + i / 2, r.y = e + n / 2, r.width = i, r.height = n
            }, triangle: function (t, e, i, n, r) {
                r.cx = t + i / 2, r.cy = e + n / 2, r.width = i, r.height = n
            }
        }, Vb = {};
    f(Rb, function (t, e) {
        Vb[e] = new t
    });
    var Gb = pa({
        type: "symbol",
        shape: {symbolType: "", x: 0, y: 0, width: 0, height: 0},
        calculateTextPosition: function (t, e, i) {
            var n = Zi(t, e, i), r = this.shape;
            return r && "pin" === r.symbolType && "inside" === e.textPosition && (n.y = i.y + .4 * i.height), n
        },
        buildPath: function (t, e, i) {
            var n = e.symbolType;
            if ("none" !== n) {
                var r = Vb[n];
                r || (n = "rect", r = Vb[n]), Fb[n](e.x, e.y, e.width, e.height, r.shape), r.buildPath(t, r.shape, i)
            }
        }
    }), Hb = {isDimensionStacked: uh, enableDataStack: lh, getStackedDimension: hh}, Wb = (Object.freeze || Object)({
        createList: qh,
        getLayoutRect: Ko,
        dataStack: Hb,
        createScale: jh,
        mixinAxisModelCommonMethods: Zh,
        completeDimensions: ih,
        createDimensions: ib,
        createSymbol: Yh
    }), Xb = 1e-8;
    Qh.prototype = {
        constructor: Qh, properties: null, getBoundingRect: function () {
            var t = this._rect;
            if (t) return t;
            for (var e = Number.MAX_VALUE, i = [e, e], n = [-e, -e], r = [], a = [], o = this.geometries, s = 0; s < o.length; s++) if ("polygon" === o[s].type) {
                var l = o[s].exterior;
                Br(l, r, a), oe(i, i, r), se(n, n, a)
            }
            return 0 === s && (i[0] = i[1] = n[0] = n[1] = 0), this._rect = new Ii(i[0], i[1], n[0] - i[0], n[1] - i[1])
        }, contain: function (t) {
            var e = this.getBoundingRect(), i = this.geometries;
            if (!e.contain(t[0], t[1])) return !1;
            t:for (var n = 0, r = i.length; r > n; n++) if ("polygon" === i[n].type) {
                var a = i[n].exterior, o = i[n].interiors;
                if ($h(a, t[0], t[1])) {
                    for (var s = 0; s < (o ? o.length : 0); s++) if ($h(o[s])) continue t;
                    return !0
                }
            }
            return !1
        }, transformTo: function (t, e, i, n) {
            var r = this.getBoundingRect(), a = r.width / r.height;
            i ? n || (n = i / a) : i = a * n;
            for (var o = new Ii(t, e, i, n), s = r.calculateTransform(o), l = this.geometries, u = 0; u < l.length; u++) if ("polygon" === l[u].type) {
                for (var h = l[u].exterior, c = l[u].interiors, d = 0; d < h.length; d++) ae(h[d], h[d], s);
                for (var f = 0; f < (c ? c.length : 0); f++) for (var d = 0; d < c[f].length; d++) ae(c[f][d], c[f][d], s)
            }
            r = this._rect, r.copy(o), this.center = [r.x + r.width / 2, r.y + r.height / 2]
        }, cloneShallow: function (t) {
            null == t && (t = this.name);
            var e = new Qh(t, this.geometries, this.center);
            return e._rect = this._rect, e.transformTo = null, e
        }
    };
    var Ub = function (t, e) {
        return Jh(t), p(m(t.features, function (t) {
            return t.geometry && t.properties && t.geometry.coordinates.length > 0
        }), function (t) {
            var i = t.properties, n = t.geometry, r = n.coordinates, a = [];
            "Polygon" === n.type && a.push({
                type: "polygon",
                exterior: r[0],
                interiors: r.slice(1)
            }), "MultiPolygon" === n.type && f(r, function (t) {
                t[0] && a.push({type: "polygon", exterior: t[0], interiors: t.slice(1)})
            });
            var o = new Qh(i[e || "name"], a, i.cp);
            return o.properties = i, o
        })
    }, Yb = lr(), qb = [0, 1], jb = function (t, e, i) {
        this.dim = t, this.scale = e, this._extent = i || [0, 0], this.inverse = !1, this.onBand = !1
    };
    jb.prototype = {
        constructor: jb, contain: function (t) {
            var e = this._extent, i = Math.min(e[0], e[1]), n = Math.max(e[0], e[1]);
            return t >= i && n >= t
        }, containData: function (t) {
            return this.scale.contain(t)
        }, getExtent: function () {
            return this._extent.slice()
        }, getPixelPrecision: function (t) {
            return Co(t || this.scale.getExtent(), this._extent)
        }, setExtent: function (t, e) {
            var i = this._extent;
            i[0] = t, i[1] = e
        }, dataToCoord: function (t, e) {
            var i = this._extent, n = this.scale;
            return t = n.normalize(t), this.onBand && "ordinal" === n.type && (i = i.slice(), gc(i, n.count())), _o(t, qb, i, e)
        }, coordToData: function (t, e) {
            var i = this._extent, n = this.scale;
            this.onBand && "ordinal" === n.type && (i = i.slice(), gc(i, n.count()));
            var r = _o(t, i, qb, e);
            return this.scale.scale(r)
        }, pointToData: function () {
        }, getTicksCoords: function (t) {
            t = t || {};
            var e = t.tickModel || this.getTickModel(), i = ic(this, e), n = i.ticks, r = p(n, function (t) {
                return {coord: this.dataToCoord(t), tickValue: t}
            }, this), a = e.get("alignWithLabel");
            return mc(this, r, a, t.clamp), r
        }, getMinorTicksCoords: function () {
            if ("ordinal" === this.scale.type) return [];
            var t = this.model.getModel("minorTick"), e = t.get("splitNumber");
            e > 0 && 100 > e || (e = 5);
            var i = this.scale.getMinorTicks(e), n = p(i, function (t) {
                return p(t, function (t) {
                    return {coord: this.dataToCoord(t), tickValue: t}
                }, this)
            }, this);
            return n
        }, getViewLabels: function () {
            return ec(this).labels
        }, getLabelModel: function () {
            return this.model.getModel("axisLabel")
        }, getTickModel: function () {
            return this.model.getModel("axisTick")
        }, getBandWidth: function () {
            var t = this._extent, e = this.scale.getExtent(), i = e[1] - e[0] + (this.onBand ? 1 : 0);
            0 === i && (i = 1);
            var n = Math.abs(t[1] - t[0]);
            return Math.abs(n) / i
        }, isHorizontal: null, getRotate: null, calculateCategoryInterval: function () {
            return cc(this)
        }
    };
    var Zb = Ub, Kb = {};
    f(["map", "each", "filter", "indexOf", "inherits", "reduce", "filter", "bind", "curry", "isArray", "isString", "isObject", "isFunction", "extend", "defaults", "clone", "merge"], function (t) {
        Kb[t] = ag[t]
    });
    var $b = {};
    f(["extendShape", "extendPath", "makePath", "makeImage", "mergePath", "resizePath", "createIcon", "setHoverStyle", "setLabelStyle", "setTextStyle", "setText", "getFont", "updateProps", "initProps", "getTransform", "clipPointsByRect", "clipRectByRect", "registerShape", "getShapeClass", "Group", "Image", "Text", "Circle", "Sector", "Ring", "Polygon", "Polyline", "Rect", "Line", "BezierCurve", "Arc", "IncrementalDisplayable", "CompoundPath", "LinearGradient", "RadialGradient", "BoundingRect"], function (t) {
        $b[t] = nx[t]
    });
    var Qb = function (t) {
        this._axes = {}, this._dimList = [], this.name = t || ""
    };
    Qb.prototype = {
        constructor: Qb, type: "cartesian", getAxis: function (t) {
            return this._axes[t]
        }, getAxes: function () {
            return p(this._dimList, vc, this)
        }, getAxesByScale: function (t) {
            return t = t.toLowerCase(), m(this.getAxes(), function (e) {
                return e.scale.type === t
            })
        }, addAxis: function (t) {
            var e = t.dim;
            this._axes[e] = t, this._dimList.push(e)
        }, dataToCoord: function (t) {
            return this._dataCoordConvert(t, "dataToCoord")
        }, coordToData: function (t) {
            return this._dataCoordConvert(t, "coordToData")
        }, _dataCoordConvert: function (t, e) {
            for (var i = this._dimList, n = t instanceof Array ? [] : {}, r = 0; r < i.length; r++) {
                var a = i[r], o = this._axes[a];
                n[a] = o[e](t[a])
            }
            return n
        }
    }, yc.prototype = {
        constructor: yc, type: "cartesian2d", dimensions: ["x", "y"], getBaseAxis: function () {
            return this.getAxesByScale("ordinal")[0] || this.getAxesByScale("time")[0] || this.getAxis("x")
        }, containPoint: function (t) {
            var e = this.getAxis("x"), i = this.getAxis("y");
            return e.contain(e.toLocalCoord(t[0])) && i.contain(i.toLocalCoord(t[1]))
        }, containData: function (t) {
            return this.getAxis("x").containData(t[0]) && this.getAxis("y").containData(t[1])
        }, dataToPoint: function (t, e, i) {
            var n = this.getAxis("x"), r = this.getAxis("y");
            return i = i || [], i[0] = n.toGlobalCoord(n.dataToCoord(t[0])), i[1] = r.toGlobalCoord(r.dataToCoord(t[1])), i
        }, clampData: function (t, e) {
            var i = this.getAxis("x").scale, n = this.getAxis("y").scale, r = i.getExtent(), a = n.getExtent(),
                o = i.parse(t[0]), s = n.parse(t[1]);
            return e = e || [], e[0] = Math.min(Math.max(Math.min(r[0], r[1]), o), Math.max(r[0], r[1])), e[1] = Math.min(Math.max(Math.min(a[0], a[1]), s), Math.max(a[0], a[1])), e
        }, pointToData: function (t, e) {
            var i = this.getAxis("x"), n = this.getAxis("y");
            return e = e || [], e[0] = i.coordToData(i.toLocalCoord(t[0])), e[1] = n.coordToData(n.toLocalCoord(t[1])), e
        }, getOtherAxis: function (t) {
            return this.getAxis("x" === t.dim ? "y" : "x")
        }, getArea: function () {
            var t = this.getAxis("x").getGlobalExtent(), e = this.getAxis("y").getGlobalExtent(),
                i = Math.min(t[0], t[1]), n = Math.min(e[0], e[1]), r = Math.max(t[0], t[1]) - i,
                a = Math.max(e[0], e[1]) - n, o = new Ii(i, n, r, a);
            return o
        }
    }, h(yc, Qb);
    var Jb = function (t, e, i, n, r) {
        jb.call(this, t, e, i), this.type = n || "value", this.position = r || "bottom"
    };
    Jb.prototype = {
        constructor: Jb, index: 0, getAxesOnZeroOf: null, model: null, isHorizontal: function () {
            var t = this.position;
            return "top" === t || "bottom" === t
        }, getGlobalExtent: function (t) {
            var e = this.getExtent();
            return e[0] = this.toGlobalCoord(e[0]), e[1] = this.toGlobalCoord(e[1]), t && e[0] > e[1] && e.reverse(), e
        }, getOtherAxis: function () {
            this.grid.getOtherAxis()
        }, pointToData: function (t, e) {
            return this.coordToData(this.toLocalCoord(t["x" === this.dim ? 0 : 1]), e)
        }, toLocalCoord: null, toGlobalCoord: null
    }, h(Jb, jb);
    var tS = {
        show: !0,
        zlevel: 0,
        z: 0,
        inverse: !1,
        name: "",
        nameLocation: "end",
        nameRotate: null,
        nameTruncate: {maxWidth: null, ellipsis: "...", placeholder: "."},
        nameTextStyle: {},
        nameGap: 15,
        silent: !1,
        triggerEvent: !1,
        tooltip: {show: !1},
        axisPointer: {},
        axisLine: {
            show: !0,
            onZero: !0,
            onZeroAxisIndex: null,
            lineStyle: {color: "#333", width: 1, type: "solid"},
            symbol: ["none", "none"],
            symbolSize: [10, 15]
        },
        axisTick: {show: !0, inside: !1, length: 5, lineStyle: {width: 1}},
        axisLabel: {show: !0, inside: !1, rotate: 0, showMinLabel: null, showMaxLabel: null, margin: 8, fontSize: 12},
        splitLine: {show: !0, lineStyle: {color: ["#ccc"], width: 1, type: "solid"}},
        splitArea: {show: !1, areaStyle: {color: ["rgba(250,250,250,0.3)", "rgba(200,200,200,0.3)"]}}
    }, eS = {};
    eS.categoryAxis = r({
        boundaryGap: !0,
        deduplication: null,
        splitLine: {show: !1},
        axisTick: {alignWithLabel: !1, interval: "auto"},
        axisLabel: {interval: "auto"}
    }, tS), eS.valueAxis = r({
        boundaryGap: [0, 0],
        splitNumber: 5,
        minorTick: {show: !1, splitNumber: 5, length: 3, lineStyle: {}},
        minorSplitLine: {show: !1, lineStyle: {color: "#eee", width: 1}}
    }, tS), eS.timeAxis = s({scale: !0, min: "dataMin", max: "dataMax"}, eS.valueAxis), eS.logAxis = s({
        scale: !0,
        logBase: 10
    }, eS.valueAxis);
    var iS = ["value", "category", "time", "log"], nS = function (t, e, i, n) {
        f(iS, function (o) {
            e.extend({
                type: t + "Axis." + o, mergeDefaultAndTheme: function (e, n) {
                    var a = this.layoutMode, s = a ? Qo(e) : {}, l = n.getTheme();
                    r(e, l.get(o + "Axis")), r(e, this.getDefaultOption()), e.type = i(t, e), a && $o(e, s, a)
                }, optionUpdated: function () {
                    var t = this.option;
                    "category" === t.type && (this.__ordinalMeta = gh.createByAxisModel(this))
                }, getCategories: function (t) {
                    var e = this.option;
                    return "category" === e.type ? t ? e.data : this.__ordinalMeta.categories : void 0
                }, getOrdinalMeta: function () {
                    return this.__ordinalMeta
                }, defaultOption: a([{}, eS[o + "Axis"], n], !0)
            })
        }), Ax.registerSubTypeDefaulter(t + "Axis", x(i, t))
    }, rS = Ax.extend({
        type: "cartesian2dAxis", axis: null, init: function () {
            rS.superApply(this, "init", arguments), this.resetRange()
        }, mergeOption: function () {
            rS.superApply(this, "mergeOption", arguments), this.resetRange()
        }, restoreData: function () {
            rS.superApply(this, "restoreData", arguments), this.resetRange()
        }, getCoordSysModel: function () {
            return this.ecModel.queryComponents({
                mainType: "grid",
                index: this.option.gridIndex,
                id: this.option.gridId
            })[0]
        }
    });
    r(rS.prototype, Ob);
    var aS = {offset: 0};
    nS("x", rS, xc, aS), nS("y", rS, xc, aS), Ax.extend({
        type: "grid",
        dependencies: ["xAxis", "yAxis"],
        layoutMode: "box",
        coordinateSystem: null,
        defaultOption: {
            show: !1,
            zlevel: 0,
            z: 0,
            left: "10%",
            top: 60,
            right: "10%",
            bottom: 60,
            containLabel: !1,
            backgroundColor: "rgba(0,0,0,0)",
            borderWidth: 1,
            borderColor: "#ccc"
        }
    });
    var oS = wc.prototype;
    oS.type = "grid", oS.axisPointerEnabled = !0, oS.getRect = function () {
        return this._rect
    }, oS.update = function (t, e) {
        var i = this._axesMap;
        this._updateScale(t, this.model), f(i.x, function (t) {
            Eh(t.scale, t.model)
        }), f(i.y, function (t) {
            Eh(t.scale, t.model)
        });
        var n = {};
        f(i.x, function (t) {
            bc(i, "y", t, n)
        }), f(i.y, function (t) {
            bc(i, "x", t, n)
        }), this.resize(this.model, e)
    }, oS.resize = function (t, e, i) {
        function n() {
            f(a, function (t) {
                var e = t.isHorizontal(), i = e ? [0, r.width] : [0, r.height], n = t.inverse ? 1 : 0;
                t.setExtent(i[n], i[1 - n]), Mc(t, e ? r.x : r.y)
            })
        }

        var r = Ko(t.getBoxLayoutParams(), {width: e.getWidth(), height: e.getHeight()});
        this._rect = r;
        var a = this._axesList;
        n(), !i && t.get("containLabel") && (f(a, function (t) {
            if (!t.model.get("axisLabel.inside")) {
                var e = Gh(t);
                if (e) {
                    var i = t.isHorizontal() ? "height" : "width", n = t.model.get("axisLabel.margin");
                    r[i] -= e[i] + n, "top" === t.position ? r.y += e.height + n : "left" === t.position && (r.x += e.width + n)
                }
            }
        }), n())
    }, oS.getAxis = function (t, e) {
        var i = this._axesMap[t];
        if (null != i) {
            if (null == e) for (var n in i) if (i.hasOwnProperty(n)) return i[n];
            return i[e]
        }
    }, oS.getAxes = function () {
        return this._axesList.slice()
    }, oS.getCartesian = function (t, e) {
        if (null != t && null != e) {
            var i = "x" + t + "y" + e;
            return this._coordsMap[i]
        }
        S(t) && (e = t.yAxisIndex, t = t.xAxisIndex);
        for (var n = 0, r = this._coordsList; n < r.length; n++) if (r[n].getAxis("x").index === t || r[n].getAxis("y").index === e) return r[n]
    }, oS.getCartesians = function () {
        return this._coordsList.slice()
    }, oS.convertToPixel = function (t, e, i) {
        var n = this._findConvertTarget(t, e);
        return n.cartesian ? n.cartesian.dataToPoint(i) : n.axis ? n.axis.toGlobalCoord(n.axis.dataToCoord(i)) : null
    }, oS.convertFromPixel = function (t, e, i) {
        var n = this._findConvertTarget(t, e);
        return n.cartesian ? n.cartesian.pointToData(i) : n.axis ? n.axis.coordToData(n.axis.toLocalCoord(i)) : null
    }, oS._findConvertTarget = function (t, e) {
        var i, n, r = e.seriesModel, a = e.xAxisModel || r && r.getReferringComponents("xAxis")[0],
            o = e.yAxisModel || r && r.getReferringComponents("yAxis")[0], s = e.gridModel, l = this._coordsList;
        if (r) i = r.coordinateSystem, u(l, i) < 0 && (i = null);
        else if (a && o) i = this.getCartesian(a.componentIndex, o.componentIndex); else if (a) n = this.getAxis("x", a.componentIndex); else if (o) n = this.getAxis("y", o.componentIndex); else if (s) {
            var h = s.coordinateSystem;
            h === this && (i = this._coordsList[0])
        }
        return {cartesian: i, axis: n}
    }, oS.containPoint = function (t) {
        var e = this._coordsList[0];
        return e ? e.containPoint(t) : void 0
    }, oS._initCartesian = function (t, e) {
        function i(i) {
            return function (o, s) {
                if (_c(o, t, e)) {
                    var l = o.get("position");
                    "x" === i ? "top" !== l && "bottom" !== l && (l = n.bottom ? "top" : "bottom") : "left" !== l && "right" !== l && (l = n.left ? "right" : "left"), n[l] = !0;
                    var u = new Jb(i, Nh(o), [0, 0], o.get("type"), l), h = "category" === u.type;
                    u.onBand = h && o.get("boundaryGap"), u.inverse = o.get("inverse"), o.axis = u, u.model = o, u.grid = this, u.index = s, this._axesList.push(u), r[i][s] = u, a[i]++
                }
            }
        }

        var n = {left: !1, right: !1, top: !1, bottom: !1}, r = {x: {}, y: {}}, a = {x: 0, y: 0};
        return e.eachComponent("xAxis", i("x"), this), e.eachComponent("yAxis", i("y"), this), a.x && a.y ? (this._axesMap = r, void f(r.x, function (e, i) {
            f(r.y, function (n, r) {
                var a = "x" + i + "y" + r, o = new yc(a);
                o.grid = this, o.model = t, this._coordsMap[a] = o, this._coordsList.push(o), o.addAxis(e), o.addAxis(n)
            }, this)
        }, this)) : (this._axesMap = {}, void (this._axesList = []))
    }, oS._updateScale = function (t, e) {
        function i(t, e) {
            f(t.mapDimension(e.dim, !0), function (i) {
                e.scale.unionExtentFromData(t, hh(t, i))
            })
        }

        f(this._axesList, function (t) {
            t.scale.setExtent(1 / 0, -1 / 0)
        }), t.eachSeries(function (n) {
            if (Cc(n)) {
                var r = Ic(n, t), a = r[0], o = r[1];
                if (!_c(a, e, t) || !_c(o, e, t)) return;
                var s = this.getCartesian(a.componentIndex, o.componentIndex), l = n.getData(), u = s.getAxis("x"),
                    h = s.getAxis("y");
                "list" === l.type && (i(l, u, n), i(l, h, n))
            }
        }, this)
    }, oS.getTooltipAxes = function (t) {
        var e = [], i = [];
        return f(this.getCartesians(), function (n) {
            var r = null != t && "auto" !== t ? n.getAxis(t) : n.getBaseAxis(), a = n.getOtherAxis(r);
            u(e, r) < 0 && e.push(r), u(i, a) < 0 && i.push(a)
        }), {baseAxes: e, otherAxes: i}
    };
    var sS = ["xAxis", "yAxis"];
    wc.create = function (t, e) {
        var i = [];
        return t.eachComponent("grid", function (n, r) {
            var a = new wc(n, t, e);
            a.name = "grid_" + r, a.resize(n, e, !0), n.coordinateSystem = a, i.push(a)
        }), t.eachSeries(function (e) {
            if (Cc(e)) {
                var i = Ic(e, t), n = i[0], r = i[1], a = n.getCoordSysModel(), o = a.coordinateSystem;
                e.coordinateSystem = o.getCartesian(n.componentIndex, r.componentIndex)
            }
        }), i
    }, wc.dimensions = wc.prototype.dimensions = yc.prototype.dimensions, Ms.register("cartesian2d", wc);
    var lS = m_.extend({
        type: "series.__base_bar__",
        getInitialData: function () {
            return ch(this.getSource(), this, {useEncodeDefaulter: !0})
        },
        getMarkerPosition: function (t) {
            var e = this.coordinateSystem;
            if (e) {
                var i = e.dataToPoint(e.clampData(t)), n = this.getData(), r = n.getLayout("offset"),
                    a = n.getLayout("size"), o = e.getBaseAxis().isHorizontal() ? 0 : 1;
                return i[o] += r + a / 2, i
            }
            return [0 / 0, 0 / 0]
        },
        defaultOption: {
            zlevel: 0,
            z: 2,
            coordinateSystem: "cartesian2d",
            legendHoverLink: !0,
            barMinHeight: 0,
            barMinAngle: 0,
            large: !1,
            largeThreshold: 400,
            progressive: 3e3,
            progressiveChunkMode: "mod",
            itemStyle: {},
            emphasis: {}
        }
    });
    lS.extend({
        type: "series.bar",
        dependencies: ["grid", "polar"],
        brushSelector: "rect",
        getProgressive: function () {
            return this.get("large") ? this.get("progressive") : !1
        },
        getProgressiveThreshold: function () {
            var t = this.get("progressiveThreshold"), e = this.get("largeThreshold");
            return e > t && (t = e), t
        },
        defaultOption: {
            clip: !0,
            roundCap: !1,
            showBackground: !1,
            backgroundStyle: {
                color: "rgba(180, 180, 180, 0.2)",
                borderColor: null,
                borderWidth: 0,
                borderType: "solid",
                borderRadius: 0,
                shadowBlur: 0,
                shadowColor: null,
                shadowOffsetX: 0,
                shadowOffsetY: 0,
                opacity: 1
            }
        }
    });
    var uS = fv([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["stroke", "barBorderColor"], ["lineWidth", "barBorderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]),
        hS = {
            getBarItemStyle: function (t) {
                var e = uS(this, t);
                if (this.getBorderLineDash) {
                    var i = this.getBorderLineDash();
                    i && (e.lineDash = i)
                }
                return e
            }
        }, cS = pa({
            type: "sausage",
            shape: {cx: 0, cy: 0, r0: 0, r: 0, startAngle: 0, endAngle: 2 * Math.PI, clockwise: !0},
            buildPath: function (t, e) {
                var i = e.cx, n = e.cy, r = Math.max(e.r0 || 0, 0), a = Math.max(e.r, 0), o = .5 * (a - r), s = r + o,
                    l = e.startAngle, u = e.endAngle, h = e.clockwise, c = Math.cos(l), d = Math.sin(l), f = Math.cos(u),
                    p = Math.sin(u), g = h ? u - l < 2 * Math.PI : l - u < 2 * Math.PI;
                g && (t.moveTo(c * r + i, d * r + n), t.arc(c * s + i, d * s + n, o, -Math.PI + l, l, !h)), t.arc(i, n, a, l, u, !h), t.moveTo(f * a + i, p * a + n), t.arc(f * s + i, p * s + n, o, u - 2 * Math.PI, u - Math.PI, !h), 0 !== r && (t.arc(i, n, r, u, l, h), t.moveTo(c * r + i, p * r + n)), t.closePath()
            }
        }), dS = ["itemStyle", "barBorderWidth"], fS = [0, 0];
    o(fo.prototype, hS), Pu({
        type: "bar", render: function (t, e, i) {
            this._updateDrawMode(t);
            var n = t.get("coordinateSystem");
            return ("cartesian2d" === n || "polar" === n) && (this._isLargeDraw ? this._renderLarge(t, e, i) : this._renderNormal(t, e, i)), this.group
        }, incrementalPrepareRender: function (t) {
            this._clear(), this._updateDrawMode(t)
        }, incrementalRender: function (t, e) {
            this._incrementalRenderLarge(t, e)
        }, _updateDrawMode: function (t) {
            var e = t.pipelineContext.large;
            (null == this._isLargeDraw || e ^ this._isLargeDraw) && (this._isLargeDraw = e, this._clear())
        }, _renderNormal: function (t) {
            var e, i = this.group, n = t.getData(), r = this._data, a = t.coordinateSystem, o = a.getBaseAxis();
            "cartesian2d" === a.type ? e = o.isHorizontal() : "polar" === a.type && (e = "angle" === o.dim);
            var s = t.isAnimationEnabled() ? t : null, l = t.get("clip", !0), u = Oc(a, n);
            i.removeClipPath();
            var h = t.get("roundCap", !0), c = t.get("showBackground", !0), d = t.getModel("backgroundStyle"),
                f = d.get("barBorderRadius") || 0, p = [], g = this._backgroundEls || [], m = function (t) {
                    var i = yS[a.type](n, t), r = Xc(a, e, i);
                    return r.useStyle(d.getBarItemStyle()), "cartesian2d" === a.type && r.setShape("r", f), p[t] = r, r
                };
            n.diff(r).add(function (r) {
                var o = n.getItemModel(r), d = yS[a.type](n, r, o);
                if (c && m(r), n.hasValue(r)) {
                    if (l) {
                        var f = mS[a.type](u, d);
                        if (f) return void i.remove(p)
                    }
                    var p = vS[a.type](r, d, e, s, !1, h);
                    n.setItemGraphicEl(r, p), i.add(p), Nc(p, n, r, o, d, t, e, "polar" === a.type)
                }
            }).update(function (o, v) {
                var y = n.getItemModel(o), x = yS[a.type](n, o, y);
                if (c) {
                    var _;
                    0 === g.length ? _ = m(v) : (_ = g[v], _.useStyle(d.getBarItemStyle()), "cartesian2d" === a.type && _.setShape("r", f), p[o] = _);
                    var w = yS[a.type](n, o), b = Wc(e, w, a);
                    Ja(_, {shape: b}, s, o)
                }
                var S = r.getItemGraphicEl(v);
                if (!n.hasValue(o)) return void i.remove(S);
                if (l) {
                    var M = mS[a.type](u, x);
                    if (M) return void i.remove(S)
                }
                S ? Ja(S, {shape: x}, s, o) : S = vS[a.type](o, x, e, s, !0, h), n.setItemGraphicEl(o, S), i.add(S), Nc(S, n, o, y, x, t, e, "polar" === a.type)
            }).remove(function (t) {
                var e = r.getItemGraphicEl(t);
                "cartesian2d" === a.type ? e && zc(t, s, e) : e && Bc(t, s, e)
            }).execute();
            var v = this._backgroundGroup || (this._backgroundGroup = new am);
            v.removeAll();
            for (var y = 0; y < p.length; ++y) v.add(p[y]);
            i.add(v), this._backgroundEls = p, this._data = n
        }, _renderLarge: function (t) {
            this._clear(), Fc(t, this.group);
            var e = t.get("clip", !0) ? Lc(t.coordinateSystem, !1, t) : null;
            e ? this.group.setClipPath(e) : this.group.removeClipPath()
        }, _incrementalRenderLarge: function (t, e) {
            this._removeBackground(), Fc(e, this.group, !0)
        }, dispose: V, remove: function (t) {
            this._clear(t)
        }, _clear: function (t) {
            var e = this.group, i = this._data;
            t && t.get("animation") && i && !this._isLargeDraw ? (this._removeBackground(), this._backgroundEls = [], i.eachItemGraphicEl(function (e) {
                "sector" === e.type ? Bc(e.dataIndex, t, e) : zc(e.dataIndex, t, e)
            })) : e.removeAll(), this._data = null
        }, _removeBackground: function () {
            this.group.remove(this._backgroundGroup), this._backgroundGroup = null
        }
    });
    var pS = Math.max, gS = Math.min, mS = {
        cartesian2d: function (t, e) {
            var i = e.width < 0 ? -1 : 1, n = e.height < 0 ? -1 : 1;
            0 > i && (e.x += e.width, e.width = -e.width), 0 > n && (e.y += e.height, e.height = -e.height);
            var r = pS(e.x, t.x), a = gS(e.x + e.width, t.x + t.width), o = pS(e.y, t.y),
                s = gS(e.y + e.height, t.y + t.height);
            e.x = r, e.y = o, e.width = a - r, e.height = s - o;
            var l = e.width < 0 || e.height < 0;
            return 0 > i && (e.x += e.width, e.width = -e.width), 0 > n && (e.y += e.height, e.height = -e.height), l
        }, polar: function (t, e) {
            var i = e.r0 <= e.r ? 1 : -1;
            if (0 > i) {
                var n = e.r;
                e.r = e.r0, e.r0 = n
            }
            var n = gS(e.r, t.r), r = pS(e.r0, t.r0);
            e.r = n, e.r0 = r;
            var a = 0 > n - r;
            if (0 > i) {
                var n = e.r;
                e.r = e.r0, e.r0 = n
            }
            return a
        }
    }, vS = {
        cartesian2d: function (t, e, i, n, r) {
            var a = new Ly({shape: o({}, e), z2: 1});
            if (a.name = "item", n) {
                var s = a.shape, l = i ? "height" : "width", u = {};
                s[l] = 0, u[l] = e[l], nx[r ? "updateProps" : "initProps"](a, {shape: u}, n, t)
            }
            return a
        }, polar: function (t, e, i, n, r, a) {
            var o = e.startAngle < e.endAngle, l = !i && a ? cS : My, u = new l({shape: s({clockwise: o}, e), z2: 1});
            if (u.name = "item", n) {
                var h = u.shape, c = i ? "r" : "endAngle", d = {};
                h[c] = i ? 0 : e.startAngle, d[c] = e[c], nx[r ? "updateProps" : "initProps"](u, {shape: d}, n, t)
            }
            return u
        }
    }, yS = {
        cartesian2d: function (t, e, i) {
            var n = t.getItemLayout(e), r = i ? Rc(i, n) : 0, a = n.width > 0 ? 1 : -1, o = n.height > 0 ? 1 : -1;
            return {x: n.x + a * r / 2, y: n.y + o * r / 2, width: n.width - a * r, height: n.height - o * r}
        }, polar: function (t, e) {
            var i = t.getItemLayout(e);
            return {cx: i.cx, cy: i.cy, r0: i.r0, r: i.r, startAngle: i.startAngle, endAngle: i.endAngle}
        }
    }, xS = ta.extend({
        type: "largeBar", shape: {points: []}, buildPath: function (t, e) {
            for (var i = e.points, n = this.__startPoint, r = this.__baseDimIdx, a = 0; a < i.length; a += 2) n[r] = i[a + r], t.moveTo(n[0], n[1]), t.lineTo(i[a], i[a + 1])
        }
    }), _S = gl(function (t) {
        var e = this, i = Vc(e, t.offsetX, t.offsetY);
        e.dataIndex = i >= 0 ? i : null
    }, 30, !1), wS = Math.PI, bS = function (t, e) {
        this.opt = e, this.axisModel = t, s(e, {
            labelOffset: 0,
            nameDirection: 1,
            tickDirection: 1,
            labelDirection: 1,
            silent: !0
        }), this.group = new am;
        var i = new am({position: e.position.slice(), rotation: e.rotation});
        i.updateTransform(), this._transform = i.transform, this._dumbGroup = i
    };
    bS.prototype = {
        constructor: bS, hasBuilder: function (t) {
            return !!SS[t]
        }, add: function (t) {
            SS[t].call(this)
        }, getGroup: function () {
            return this.group
        }
    };
    var SS = {
        axisLine: function () {
            var t = this.opt, e = this.axisModel;
            if (e.get("axisLine.show")) {
                var i = this.axisModel.axis.getExtent(), n = this._transform, r = [i[0], 0], a = [i[1], 0];
                n && (ae(r, r, n), ae(a, a, n));
                var s = o({lineCap: "round"}, e.getModel("axisLine.lineStyle").getLineStyle());
                this.group.add(new zy({
                    anid: "line",
                    subPixelOptimize: !0,
                    shape: {x1: r[0], y1: r[1], x2: a[0], y2: a[1]},
                    style: s,
                    strokeContainThreshold: t.strokeContainThreshold || 5,
                    silent: !0,
                    z2: 1
                }));
                var l = e.get("axisLine.symbol"), u = e.get("axisLine.symbolSize"),
                    h = e.get("axisLine.symbolOffset") || 0;
                if ("number" == typeof h && (h = [h, h]), null != l) {
                    "string" == typeof l && (l = [l, l]), ("string" == typeof u || "number" == typeof u) && (u = [u, u]);
                    var c = u[0], d = u[1];
                    f([{rotate: t.rotation + Math.PI / 2, offset: h[0], r: 0}, {
                        rotate: t.rotation - Math.PI / 2,
                        offset: h[1],
                        r: Math.sqrt((r[0] - a[0]) * (r[0] - a[0]) + (r[1] - a[1]) * (r[1] - a[1]))
                    }], function (e, i) {
                        if ("none" !== l[i] && null != l[i]) {
                            var n = Yh(l[i], -c / 2, -d / 2, c, d, s.stroke, !0), a = e.r + e.offset,
                                o = [r[0] + a * Math.cos(t.rotation), r[1] - a * Math.sin(t.rotation)];
                            n.attr({rotation: e.rotate, position: o, silent: !0, z2: 11}), this.group.add(n)
                        }
                    }, this)
                }
            }
        }, axisTickLabel: function () {
            var t = this.axisModel, e = this.opt, i = $c(this, t, e), n = Jc(this, t, e);
            Yc(t, n, i), Qc(this, t, e)
        }, axisName: function () {
            var t = this.opt, e = this.axisModel, i = D(t.axisName, e.get("name"));
            if (i) {
                var n, r = e.get("nameLocation"), a = t.nameDirection, s = e.getModel("nameTextStyle"),
                    l = e.get("nameGap") || 0, u = this.axisModel.axis.getExtent(), h = u[0] > u[1] ? -1 : 1,
                    c = ["start" === r ? u[0] - h * l : "end" === r ? u[1] + h * l : (u[0] + u[1]) / 2, Zc(r) ? t.labelOffset + a * l : 0],
                    d = e.get("nameRotate");
                null != d && (d = d * wS / 180);
                var f;
                Zc(r) ? n = IS(t.rotation, null != d ? d : t.rotation, a) : (n = Uc(t, r, d || 0, u), f = t.axisNameAvailableWidth, null != f && (f = Math.abs(f / Math.sin(n.rotation)), !isFinite(f) && (f = null)));
                var p = s.getFont(), g = e.get("nameTruncate", !0) || {}, m = g.ellipsis,
                    v = D(t.nameTruncateMaxWidth, g.maxWidth, f),
                    y = null != m && null != v ? _x(i, v, p, m, {minChar: 2, placeholder: g.placeholder}) : i,
                    x = e.get("tooltip", !0), _ = e.mainType, w = {componentType: _, name: i, $vars: ["name"]};
                w[_ + "Index"] = e.componentIndex;
                var b = new _y({
                    anid: "name",
                    __fullText: i,
                    __truncatedText: y,
                    position: c,
                    rotation: n.rotation,
                    silent: CS(e),
                    z2: 1,
                    tooltip: x && x.show ? o({
                        content: i, formatter: function () {
                            return i
                        }, formatterParams: w
                    }, x) : null
                });
                Wa(b.style, s, {
                    text: y,
                    textFont: p,
                    textFill: s.getTextColor() || e.get("axisLine.lineStyle.color"),
                    textAlign: s.get("align") || n.textAlign,
                    textVerticalAlign: s.get("verticalAlign") || n.textVerticalAlign
                }), e.get("triggerEvent") && (b.eventData = MS(e), b.eventData.targetType = "axisName", b.eventData.name = i), this._dumbGroup.add(b), b.updateTransform(), this.group.add(b), b.decomposeTransform()
            }
        }
    }, MS = bS.makeAxisEventDataBase = function (t) {
        var e = {componentType: t.mainType, componentIndex: t.componentIndex};
        return e[t.mainType + "Index"] = t.componentIndex, e
    }, IS = bS.innerTextLayout = function (t, e, i) {
        var n, r, a = Do(e - t);
        return Ao(a) ? (r = i > 0 ? "top" : "bottom", n = "center") : Ao(a - wS) ? (r = i > 0 ? "bottom" : "top", n = "center") : (r = "middle", n = a > 0 && wS > a ? i > 0 ? "right" : "left" : i > 0 ? "left" : "right"), {
            rotation: a,
            textAlign: n,
            textVerticalAlign: r
        }
    }, CS = bS.isLabelSilent = function (t) {
        var e = t.get("tooltip");
        return t.get("silent") || !(t.get("triggerEvent") || e && e.show)
    }, TS = f, DS = x, AS = Au({
        type: "axis", _axisPointer: null, axisPointerClass: null, render: function (t, e, i, n) {
            this.axisPointerClass && od(t), AS.superApply(this, "render", arguments), cd(this, t, e, i, n, !0)
        }, updateAxisPointer: function (t, e, i, n) {
            cd(this, t, e, i, n, !1)
        }, remove: function (t, e) {
            var i = this._axisPointer;
            i && i.remove(e), AS.superApply(this, "remove", arguments)
        }, dispose: function (t, e) {
            dd(this, e), AS.superApply(this, "dispose", arguments)
        }
    }), kS = [];
    AS.registerAxisPointerClass = function (t, e) {
        kS[t] = e
    }, AS.getAxisPointerClass = function (t) {
        return t && kS[t]
    };
    var PS = ["axisLine", "axisTickLabel", "axisName"], LS = ["splitArea", "splitLine", "minorSplitLine"],
        OS = AS.extend({
            type: "cartesianAxis", axisPointerClass: "CartesianAxisPointer", render: function (t, e, i, n) {
                this.group.removeAll();
                var r = this._axisGroup;
                if (this._axisGroup = new am, this.group.add(this._axisGroup), t.get("show")) {
                    var a = t.getCoordSysModel(), o = fd(a, t), s = new bS(t, o);
                    f(PS, s.add, s), this._axisGroup.add(s.getGroup()), f(LS, function (e) {
                        t.get(e + ".show") && this["_" + e](t, a)
                    }, this), ro(r, this._axisGroup, t), OS.superCall(this, "render", t, e, i, n)
                }
            }, remove: function () {
                gd(this)
            }, _splitLine: function (t, e) {
                var i = t.axis;
                if (!i.scale.isBlank()) {
                    var n = t.getModel("splitLine"), r = n.getModel("lineStyle"), a = r.get("color");
                    a = _(a) ? a : [a];
                    for (var o = e.coordinateSystem.getRect(), l = i.isHorizontal(), u = 0, h = i.getTicksCoords({tickModel: n}), c = [], d = [], f = r.getLineStyle(), p = 0; p < h.length; p++) {
                        var g = i.toGlobalCoord(h[p].coord);
                        l ? (c[0] = g, c[1] = o.y, d[0] = g, d[1] = o.y + o.height) : (c[0] = o.x, c[1] = g, d[0] = o.x + o.width, d[1] = g);
                        var m = u++ % a.length, v = h[p].tickValue;
                        this._axisGroup.add(new zy({
                            anid: null != v ? "line_" + h[p].tickValue : null,
                            subPixelOptimize: !0,
                            shape: {x1: c[0], y1: c[1], x2: d[0], y2: d[1]},
                            style: s({stroke: a[m]}, f),
                            silent: !0
                        }))
                    }
                }
            }, _minorSplitLine: function (t, e) {
                var i = t.axis, n = t.getModel("minorSplitLine"), r = n.getModel("lineStyle"),
                    a = e.coordinateSystem.getRect(), o = i.isHorizontal(), s = i.getMinorTicksCoords();
                if (s.length) for (var l = [], u = [], h = r.getLineStyle(), c = 0; c < s.length; c++) for (var d = 0; d < s[c].length; d++) {
                    var f = i.toGlobalCoord(s[c][d].coord);
                    o ? (l[0] = f, l[1] = a.y, u[0] = f, u[1] = a.y + a.height) : (l[0] = a.x, l[1] = f, u[0] = a.x + a.width, u[1] = f), this._axisGroup.add(new zy({
                        anid: "minor_line_" + s[c][d].tickValue,
                        subPixelOptimize: !0,
                        shape: {x1: l[0], y1: l[1], x2: u[0], y2: u[1]},
                        style: h,
                        silent: !0
                    }))
                }
            }, _splitArea: function (t, e) {
                pd(this, this._axisGroup, t, e)
            }
        });
    OS.extend({type: "xAxis"}), OS.extend({type: "yAxis"}), Au({
        type: "grid", render: function (t) {
            this.group.removeAll(), t.get("show") && this.group.add(new Ly({
                shape: t.coordinateSystem.getRect(),
                style: s({fill: t.get("backgroundColor")}, t.getItemStyle()),
                silent: !0,
                z2: -1
            }))
        }
    }), yu(function (t) {
        t.xAxis && t.yAxis && !t.grid && (t.grid = {})
    }), Mu(_w.VISUAL.LAYOUT, x(Ah, "bar")), Mu(_w.VISUAL.PROGRESSIVE_LAYOUT, fb), Iu({
        seriesType: "bar",
        reset: function (t) {
            t.getData().setVisual("legendSymbol", "roundRect")
        }
    }), m_.extend({
        type: "series.line",
        dependencies: ["grid", "polar"],
        getInitialData: function () {
            return ch(this.getSource(), this, {useEncodeDefaulter: !0})
        },
        defaultOption: {
            zlevel: 0,
            z: 2,
            coordinateSystem: "cartesian2d",
            legendHoverLink: !0,
            hoverAnimation: !0,
            clip: !0,
            label: {position: "top"},
            lineStyle: {width: 2, type: "solid"},
            step: !1,
            smooth: !1,
            smoothMonotone: null,
            symbol: "emptyCircle",
            symbolSize: 4,
            symbolRotate: null,
            showSymbol: !0,
            showAllSymbol: "auto",
            connectNulls: !1,
            sampling: "none",
            animationEasing: "linear",
            progressive: 0,
            hoverLayerThreshold: 1 / 0
        }
    });
    var zS = md.prototype, BS = md.getSymbolSize = function (t, e) {
        var i = t.getItemVisual(e, "symbolSize");
        return i instanceof Array ? i.slice() : [+i, +i]
    };
    zS._createSymbol = function (t, e, i, n, r) {
        this.removeAll();
        var a = e.getItemVisual(i, "color"), o = Yh(t, -1, -1, 2, 2, a, r);
        o.attr({z2: 100, culling: !0, scale: vd(n)}), o.drift = yd, this._symbolType = t, this.add(o)
    }, zS.stopSymbolAnimation = function (t) {
        this.childAt(0).stopAnimation(t)
    }, zS.getSymbolPath = function () {
        return this.childAt(0)
    }, zS.getScale = function () {
        return this.childAt(0).scale
    }, zS.highlight = function () {
        this.childAt(0).trigger("emphasis")
    }, zS.downplay = function () {
        this.childAt(0).trigger("normal")
    }, zS.setZ = function (t, e) {
        var i = this.childAt(0);
        i.zlevel = t, i.z = e
    }, zS.setDraggable = function (t) {
        var e = this.childAt(0);
        e.draggable = t, e.cursor = t ? "move" : e.cursor
    }, zS.updateData = function (t, e, i) {
        this.silent = !1;
        var n = t.getItemVisual(e, "symbol") || "circle", r = t.hostModel, a = BS(t, e), o = n !== this._symbolType;
        if (o) {
            var s = t.getItemVisual(e, "symbolKeepAspect");
            this._createSymbol(n, t, e, a, s)
        } else {
            var l = this.childAt(0);
            l.silent = !1, Ja(l, {scale: vd(a)}, r, e)
        }
        if (this._updateCommon(t, e, a, i), o) {
            var l = this.childAt(0), u = i && i.fadeIn, h = {scale: l.scale.slice()};
            u && (h.style = {opacity: l.style.opacity}), l.scale = [0, 0], u && (l.style.opacity = 0), to(l, h, r, e)
        }
        this._seriesModel = r
    };
    var ES = ["itemStyle"], NS = ["emphasis", "itemStyle"], RS = ["label"], FS = ["emphasis", "label"];
    zS._updateCommon = function (t, e, i, n) {
        function r(e) {
            return b ? t.getName(e) : Tc(t, e)
        }

        var a = this.childAt(0), s = t.hostModel, l = t.getItemVisual(e, "color");
        "image" !== a.type ? a.useStyle({strokeNoScale: !0}) : a.setStyle({
            opacity: 1,
            shadowBlur: null,
            shadowOffsetX: null,
            shadowOffsetY: null,
            shadowColor: null
        });
        var u = n && n.itemStyle, h = n && n.hoverItemStyle, c = n && n.symbolOffset, d = n && n.labelModel,
            f = n && n.hoverLabelModel, p = n && n.hoverAnimation, g = n && n.cursorStyle;
        if (!n || t.hasItemOption) {
            var m = n && n.itemModel ? n.itemModel : t.getItemModel(e);
            u = m.getModel(ES).getItemStyle(["color"]), h = m.getModel(NS).getItemStyle(), c = m.getShallow("symbolOffset"), d = m.getModel(RS), f = m.getModel(FS), p = m.getShallow("hoverAnimation"), g = m.getShallow("cursor")
        } else h = o({}, h);
        var v = a.style, y = t.getItemVisual(e, "symbolRotate");
        a.attr("rotation", (y || 0) * Math.PI / 180 || 0), c && a.attr("position", [wo(c[0], i[0]), wo(c[1], i[1])]), g && a.attr("cursor", g), a.setColor(l, n && n.symbolInnerColor), a.setStyle(u);
        var x = t.getItemVisual(e, "opacity");
        null != x && (v.opacity = x);
        var _ = t.getItemVisual(e, "liftZ"), w = a.__z2Origin;
        null != _ ? null == w && (a.__z2Origin = a.z2, a.z2 += _) : null != w && (a.z2 = w, a.__z2Origin = null);
        var b = n && n.useNameLabel;
        Ga(v, h, d, f, {
            labelFetcher: s,
            labelDataIndex: e,
            defaultText: r,
            isRectText: !0,
            autoColor: l
        }), a.__symbolOriginalScale = vd(i), a.hoverStyle = h, a.highDownOnUpdate = p && s.isAnimationEnabled() ? xd : null, Na(a)
    }, zS.fadeOut = function (t, e) {
        var i = this.childAt(0);
        this.silent = i.silent = !0, !(e && e.keepLabel) && (i.style.text = null), Ja(i, {
            style: {opacity: 0},
            scale: [0, 0]
        }, this._seriesModel, this.dataIndex, t)
    }, h(md, am);
    var VS = _d.prototype;
    VS.updateData = function (t, e) {
        e = bd(e);
        var i = this.group, n = t.hostModel, r = this._data, a = this._symbolCtor, o = Sd(t);
        r || i.removeAll(), t.diff(r).add(function (n) {
            var r = t.getItemLayout(n);
            if (wd(t, r, n, e)) {
                var s = new a(t, n, o);
                s.attr("position", r), t.setItemGraphicEl(n, s), i.add(s)
            }
        }).update(function (s, l) {
            var u = r.getItemGraphicEl(l), h = t.getItemLayout(s);
            return wd(t, h, s, e) ? (u ? (u.updateData(t, s, o), Ja(u, {position: h}, n)) : (u = new a(t, s), u.attr("position", h)), i.add(u), void t.setItemGraphicEl(s, u)) : void i.remove(u)
        }).remove(function (t) {
            var e = r.getItemGraphicEl(t);
            e && e.fadeOut(function () {
                i.remove(e)
            })
        }).execute(), this._data = t
    }, VS.isPersistent = function () {
        return !0
    }, VS.updateLayout = function () {
        var t = this._data;
        t && t.eachItemGraphicEl(function (e, i) {
            var n = t.getItemLayout(i);
            e.attr("position", n)
        })
    }, VS.incrementalPrepareUpdate = function (t) {
        this._seriesScope = Sd(t), this._data = null, this.group.removeAll()
    }, VS.incrementalUpdate = function (t, e, i) {
        function n(t) {
            t.isGroup || (t.incremental = t.useHoverLayer = !0)
        }

        i = bd(i);
        for (var r = t.start; r < t.end; r++) {
            var a = e.getItemLayout(r);
            if (wd(e, a, r, i)) {
                var o = new this._symbolCtor(e, r, this._seriesScope);
                o.traverse(n), o.attr("position", a), this.group.add(o), e.setItemGraphicEl(r, o)
            }
        }
    }, VS.remove = function (t) {
        var e = this.group, i = this._data;
        i && t ? i.eachItemGraphicEl(function (t) {
            t.fadeOut(function () {
                e.remove(t)
            })
        }) : e.removeAll()
    };
    var GS = function (t, e, i, n, r, a, o, s) {
        for (var l = Td(t, e), u = [], h = [], c = [], d = [], f = [], p = [], g = [], m = Md(r, e, o), v = Md(a, t, s), y = 0; y < l.length; y++) {
            var x = l[y], _ = !0;
            switch (x.cmd) {
                case"=":
                    var w = t.getItemLayout(x.idx), b = e.getItemLayout(x.idx1);
                    (isNaN(w[0]) || isNaN(w[1])) && (w = b.slice()), u.push(w), h.push(b), c.push(i[x.idx]), d.push(n[x.idx1]), g.push(e.getRawIndex(x.idx1));
                    break;
                case"+":
                    var S = x.idx;
                    u.push(r.dataToPoint([e.get(m.dataDimsForPoint[0], S), e.get(m.dataDimsForPoint[1], S)])), h.push(e.getItemLayout(S).slice()), c.push(Cd(m, r, e, S)), d.push(n[S]), g.push(e.getRawIndex(S));
                    break;
                case"-":
                    var S = x.idx, M = t.getRawIndex(S);
                    M !== S ? (u.push(t.getItemLayout(S)), h.push(a.dataToPoint([t.get(v.dataDimsForPoint[0], S), t.get(v.dataDimsForPoint[1], S)])), c.push(i[S]), d.push(Cd(v, a, t, S)), g.push(M)) : _ = !1
            }
            _ && (f.push(x), p.push(p.length))
        }
        p.sort(function (t, e) {
            return g[t] - g[e]
        });
        for (var I = [], C = [], T = [], D = [], A = [], y = 0; y < p.length; y++) {
            var S = p[y];
            I[y] = u[S], C[y] = h[S], T[y] = c[S], D[y] = d[S], A[y] = f[S]
        }
        return {current: I, next: C, stackedOnCurrent: T, stackedOnNext: D, status: A}
    }, HS = oe, WS = se, XS = Y, US = H, YS = [], qS = [], jS = [], ZS = ta.extend({
        type: "ec-polyline",
        shape: {points: [], smooth: 0, smoothConstraint: !0, smoothMonotone: null, connectNulls: !1},
        style: {fill: null, stroke: "#000"},
        brush: Sy(ta.prototype.brush),
        buildPath: function (t, e) {
            var i = e.points, n = 0, r = i.length, a = Ld(i, e.smoothConstraint);
            if (e.connectNulls) {
                for (; r > 0 && Dd(i[r - 1]); r--) ;
                for (; r > n && Dd(i[n]); n++) ;
            }
            for (; r > n;) n += Ad(t, i, n, r, r, 1, a.min, a.max, e.smooth, e.smoothMonotone, e.connectNulls) + 1
        }
    }), KS = ta.extend({
        type: "ec-polygon",
        shape: {
            points: [],
            stackedOnPoints: [],
            smooth: 0,
            stackedOnSmooth: 0,
            smoothConstraint: !0,
            smoothMonotone: null,
            connectNulls: !1
        },
        brush: Sy(ta.prototype.brush),
        buildPath: function (t, e) {
            var i = e.points, n = e.stackedOnPoints, r = 0, a = i.length, o = e.smoothMonotone,
                s = Ld(i, e.smoothConstraint), l = Ld(n, e.smoothConstraint);
            if (e.connectNulls) {
                for (; a > 0 && Dd(i[a - 1]); a--) ;
                for (; a > r && Dd(i[r]); r++) ;
            }
            for (; a > r;) {
                var u = Ad(t, i, r, a, a, 1, s.min, s.max, e.smooth, o, e.connectNulls);
                Ad(t, n, r + u - 1, u, a, -1, l.min, l.max, e.stackedOnSmooth, o, e.connectNulls), r += u + 1, t.closePath()
            }
        }
    });
    hl.extend({
        type: "line", init: function () {
            var t = new am, e = new _d;
            this.group.add(e.group), this._symbolDraw = e, this._lineGroup = t
        }, render: function (t, e, i) {
            var n = t.coordinateSystem, r = this.group, a = t.getData(), o = t.getModel("lineStyle"),
                l = t.getModel("areaStyle"), u = a.mapArray(a.getItemLayout), h = "polar" === n.type,
                c = this._coordSys, d = this._symbolDraw, f = this._polyline, p = this._polygon, g = this._lineGroup,
                m = t.get("animation"), v = !l.isEmpty(), y = l.get("origin"), x = Md(n, a, y), _ = Ed(n, a, x),
                w = t.get("showSymbol"), b = w && !h && Fd(t, a, n), S = this._data;
            S && S.eachItemGraphicEl(function (t, e) {
                t.__temp && (r.remove(t), S.setItemGraphicEl(e, null))
            }), w || d.remove(), r.add(g);
            var M, I = !h && t.get("step");
            n && n.getArea && t.get("clip", !0) && (M = n.getArea(), null != M.width ? (M.x -= .1, M.y -= .1, M.width += .2, M.height += .2) : M.r0 && (M.r0 -= .5, M.r1 += .5)), this._clipShapeForSymbol = M, f && c.type === n.type && I === this._step ? (v && !p ? p = this._newPolygon(u, _, n, m) : p && !v && (g.remove(p), p = this._polygon = null), g.setClipPath(Gd(n, !1, t)), w && d.updateData(a, {
                isIgnore: b,
                clipShape: M
            }), a.eachItemGraphicEl(function (t) {
                t.stopAnimation(!0)
            }), Od(this._stackedOnPoints, _) && Od(this._points, u) || (m ? this._updateAnimation(a, _, n, i, I, y) : (I && (u = Nd(u, n, I), _ = Nd(_, n, I)), f.setShape({points: u}), p && p.setShape({
                points: u,
                stackedOnPoints: _
            })))) : (w && d.updateData(a, {
                isIgnore: b,
                clipShape: M
            }), I && (u = Nd(u, n, I), _ = Nd(_, n, I)), f = this._newPolyline(u, n, m), v && (p = this._newPolygon(u, _, n, m)), g.setClipPath(Gd(n, !0, t)));
            var C = Rd(a, n) || a.getVisual("color");
            f.useStyle(s(o.getLineStyle(), {fill: "none", stroke: C, lineJoin: "bevel"}));
            var T = t.get("smooth");
            if (T = Bd(t.get("smooth")), f.setShape({
                smooth: T,
                smoothMonotone: t.get("smoothMonotone"),
                connectNulls: t.get("connectNulls")
            }), p) {
                var D = a.getCalculationInfo("stackedOnSeries"), A = 0;
                p.useStyle(s(l.getAreaStyle(), {
                    fill: C,
                    opacity: .7,
                    lineJoin: "bevel"
                })), D && (A = Bd(D.get("smooth"))), p.setShape({
                    smooth: T,
                    stackedOnSmooth: A,
                    smoothMonotone: t.get("smoothMonotone"),
                    connectNulls: t.get("connectNulls")
                })
            }
            this._data = a, this._coordSys = n, this._stackedOnPoints = _, this._points = u, this._step = I, this._valueOrigin = y
        }, dispose: function () {
        }, highlight: function (t, e, i, n) {
            var r = t.getData(), a = sr(r, n);
            if (!(a instanceof Array) && null != a && a >= 0) {
                var o = r.getItemGraphicEl(a);
                if (!o) {
                    var s = r.getItemLayout(a);
                    if (!s) return;
                    if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(s[0], s[1])) return;
                    o = new md(r, a), o.position = s, o.setZ(t.get("zlevel"), t.get("z")), o.ignore = isNaN(s[0]) || isNaN(s[1]), o.__temp = !0, r.setItemGraphicEl(a, o), o.stopSymbolAnimation(!0), this.group.add(o)
                }
                o.highlight()
            } else hl.prototype.highlight.call(this, t, e, i, n)
        }, downplay: function (t, e, i, n) {
            var r = t.getData(), a = sr(r, n);
            if (null != a && a >= 0) {
                var o = r.getItemGraphicEl(a);
                o && (o.__temp ? (r.setItemGraphicEl(a, null), this.group.remove(o)) : o.downplay())
            } else hl.prototype.downplay.call(this, t, e, i, n)
        }, _newPolyline: function (t) {
            var e = this._polyline;
            return e && this._lineGroup.remove(e), e = new ZS({
                shape: {points: t},
                silent: !0,
                z2: 10
            }), this._lineGroup.add(e), this._polyline = e, e
        }, _newPolygon: function (t, e) {
            var i = this._polygon;
            return i && this._lineGroup.remove(i), i = new KS({
                shape: {points: t, stackedOnPoints: e},
                silent: !0
            }), this._lineGroup.add(i), this._polygon = i, i
        }, _updateAnimation: function (t, e, i, n, r, a) {
            var o = this._polyline, s = this._polygon, l = t.hostModel,
                u = GS(this._data, t, this._stackedOnPoints, e, this._coordSys, i, this._valueOrigin, a), h = u.current,
                c = u.stackedOnCurrent, d = u.next, f = u.stackedOnNext;
            if (r && (h = Nd(u.current, i, r), c = Nd(u.stackedOnCurrent, i, r), d = Nd(u.next, i, r), f = Nd(u.stackedOnNext, i, r)), zd(h, d) > 3e3 || s && zd(c, f) > 3e3) return o.setShape({points: d}), void (s && s.setShape({
                points: d,
                stackedOnPoints: f
            }));
            o.shape.__points = u.current, o.shape.points = h, Ja(o, {shape: {points: d}}, l), s && (s.setShape({
                points: h,
                stackedOnPoints: c
            }), Ja(s, {shape: {points: d, stackedOnPoints: f}}, l));
            for (var p = [], g = u.status, m = 0; m < g.length; m++) {
                var v = g[m].cmd;
                if ("=" === v) {
                    var y = t.getItemGraphicEl(g[m].idx1);
                    y && p.push({el: y, ptIdx: m})
                }
            }
            o.animators && o.animators.length && o.animators[0].during(function () {
                for (var t = 0; t < p.length; t++) {
                    var e = p[t].el;
                    e.attr("position", o.shape.__points[p[t].ptIdx])
                }
            })
        }, remove: function () {
            var t = this.group, e = this._data;
            this._lineGroup.removeAll(), this._symbolDraw.remove(!0), e && e.eachItemGraphicEl(function (i, n) {
                i.__temp && (t.remove(i), e.setItemGraphicEl(n, null))
            }), this._polyline = this._polygon = this._coordSys = this._points = this._stackedOnPoints = this._data = null
        }
    });
    var $S = function (t, e, i) {
        return {
            seriesType: t, performRawSeries: !0, reset: function (t, n) {
                function r(e, i) {
                    if (f) {
                        var n = t.getRawValue(i), r = t.getDataParams(i);
                        h && e.setItemVisual(i, "symbol", o(n, r)), c && e.setItemVisual(i, "symbolSize", s(n, r)), d && e.setItemVisual(i, "symbolRotate", u(n, r))
                    }
                    if (e.hasItemOption) {
                        var a = e.getItemModel(i), l = a.getShallow("symbol", !0), p = a.getShallow("symbolSize", !0),
                            g = a.getShallow("symbolRotate", !0), m = a.getShallow("symbolKeepAspect", !0);
                        null != l && e.setItemVisual(i, "symbol", l), null != p && e.setItemVisual(i, "symbolSize", p), null != g && e.setItemVisual(i, "symbolRotate", g), null != m && e.setItemVisual(i, "symbolKeepAspect", m)
                    }
                }

                var a = t.getData(), o = t.get("symbol"), s = t.get("symbolSize"), l = t.get("symbolKeepAspect"),
                    u = t.get("symbolRotate"), h = w(o), c = w(s), d = w(u), f = h || c || d, p = !h && o ? o : e,
                    g = c ? null : s;
                return a.setVisual({
                    legendSymbol: i || p,
                    symbol: p,
                    symbolSize: g,
                    symbolKeepAspect: l,
                    symbolRotate: u
                }), n.isSeriesFiltered(t) ? void 0 : {dataEach: a.hasItemOption || f ? r : null}
            }
        }
    }, QS = function (t) {
        return {
            seriesType: t, plan: x_(), reset: function (t) {
                function e(t, e) {
                    for (var i = t.end - t.start, r = a && new Float32Array(i * s), l = t.start, u = 0, h = [], c = []; l < t.end; l++) {
                        var d;
                        if (1 === s) {
                            var f = e.get(o[0], l);
                            d = !isNaN(f) && n.dataToPoint(f, null, c)
                        } else {
                            var f = h[0] = e.get(o[0], l), p = h[1] = e.get(o[1], l);
                            d = !isNaN(f) && !isNaN(p) && n.dataToPoint(h, null, c)
                        }
                        a ? (r[u++] = d ? d[0] : 0 / 0, r[u++] = d ? d[1] : 0 / 0) : e.setItemLayout(l, d && d.slice() || [0 / 0, 0 / 0])
                    }
                    a && e.setLayout("symbolPoints", r)
                }

                var i = t.getData(), n = t.coordinateSystem, r = t.pipelineContext, a = r.large;
                if (n) {
                    var o = p(n.dimensions, function (t) {
                        return i.mapDimension(t)
                    }).slice(0, 2), s = o.length, l = i.getCalculationInfo("stackResultDimension");
                    return uh(i, o[0]) && (o[0] = l), uh(i, o[1]) && (o[1] = l), s && {progress: e}
                }
            }
        }
    }, JS = {
        average: function (t) {
            for (var e = 0, i = 0, n = 0; n < t.length; n++) isNaN(t[n]) || (e += t[n], i++);
            return 0 === i ? 0 / 0 : e / i
        }, sum: function (t) {
            for (var e = 0, i = 0; i < t.length; i++) e += t[i] || 0;
            return e
        }, max: function (t) {
            for (var e = -1 / 0, i = 0; i < t.length; i++) t[i] > e && (e = t[i]);
            return isFinite(e) ? e : 0 / 0
        }, min: function (t) {
            for (var e = 1 / 0, i = 0; i < t.length; i++) t[i] < e && (e = t[i]);
            return isFinite(e) ? e : 0 / 0
        }, nearest: function (t) {
            return t[0]
        }
    }, tM = function (t) {
        return Math.round(t.length / 2)
    }, eM = function (t) {
        return {
            seriesType: t, modifyOutputEnd: !0, reset: function (t) {
                var e = t.getData(), i = t.get("sampling"), n = t.coordinateSystem;
                if ("cartesian2d" === n.type && i) {
                    var r = n.getBaseAxis(), a = n.getOtherAxis(r), o = r.getExtent(), s = Math.abs(o[1] - o[0]),
                        l = Math.round(e.count() / s);
                    if (l > 1) {
                        var u;
                        "string" == typeof i ? u = JS[i] : "function" == typeof i && (u = i), u && t.setData(e.downSample(e.mapDimension(a.dim), 1 / l, u, tM))
                    }
                }
            }
        }
    };
    Iu($S("line", "circle", "line")), Mu(QS("line")), xu(_w.PROCESSOR.STATISTIC, eM("line"));
    var iM = function (t, e, i) {
        e = _(e) && {coordDimensions: e} || o({}, e);
        var n = t.getSource(), r = ib(n, e), a = new Jw(r, t);
        return a.initData(n, i), a
    }, nM = {
        updateSelectedMap: function (t) {
            this._targetList = _(t) ? t.slice() : [], this._selectTargetMap = g(t || [], function (t, e) {
                return t.set(e.name, e), t
            }, R())
        }, select: function (t, e) {
            var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t), n = this.get("selectedMode");
            "single" === n && this._selectTargetMap.each(function (t) {
                t.selected = !1
            }), i && (i.selected = !0)
        }, unSelect: function (t, e) {
            var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
            i && (i.selected = !1)
        }, toggleSelected: function (t, e) {
            var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
            return null != i ? (this[i.selected ? "unSelect" : "select"](t, e), i.selected) : void 0
        }, isSelected: function (t, e) {
            var i = null != e ? this._targetList[e] : this._selectTargetMap.get(t);
            return i && i.selected
        }
    }, rM = ku({
        type: "series.pie",
        init: function (t) {
            rM.superApply(this, "init", arguments), this.legendVisualProvider = new Hd(y(this.getData, this), y(this.getRawData, this)), this.updateSelectedMap(this._createSelectableList()), this._defaultLabelLine(t)
        },
        mergeOption: function (t) {
            rM.superCall(this, "mergeOption", t), this.updateSelectedMap(this._createSelectableList())
        },
        getInitialData: function () {
            return iM(this, {coordDimensions: ["value"], encodeDefaulter: x(ds, this)})
        },
        _createSelectableList: function () {
            for (var t = this.getRawData(), e = t.mapDimension("value"), i = [], n = 0, r = t.count(); r > n; n++) i.push({
                name: t.getName(n),
                value: t.get(e, n),
                selected: $s(t, n, "selected")
            });
            return i
        },
        getDataParams: function (t) {
            var e = this.getData(), i = rM.superCall(this, "getDataParams", t), n = [];
            return e.each(e.mapDimension("value"), function (t) {
                n.push(t)
            }), i.percent = To(n, t, e.hostModel.get("percentPrecision")), i.$vars.push("percent"), i
        },
        _defaultLabelLine: function (t) {
            tr(t, "labelLine", ["show"]);
            var e = t.labelLine, i = t.emphasis.labelLine;
            e.show = e.show && t.label.show, i.show = i.show && t.emphasis.label.show
        },
        defaultOption: {
            zlevel: 0,
            z: 2,
            legendHoverLink: !0,
            hoverAnimation: !0,
            center: ["50%", "50%"],
            radius: [0, "75%"],
            clockwise: !0,
            startAngle: 90,
            minAngle: 0,
            minShowLabelAngle: 0,
            selectedOffset: 10,
            hoverOffset: 10,
            avoidLabelOverlap: !0,
            percentPrecision: 2,
            stillShowZeroSum: !0,
            left: 0,
            top: 0,
            right: 0,
            bottom: 0,
            width: null,
            height: null,
            label: {
                rotate: !1,
                show: !0,
                position: "outer",
                alignTo: "none",
                margin: "25%",
                bleedMargin: 10,
                distanceToLabelLine: 5
            },
            labelLine: {show: !0, length: 15, length2: 15, smooth: !1, lineStyle: {width: 1, type: "solid"}},
            itemStyle: {borderWidth: 1},
            animationType: "expansion",
            animationTypeUpdate: "transition",
            animationEasing: "cubicOut"
        }
    });
    c(rM, nM);
    var aM = Ud.prototype;
    aM.updateData = function (t, e, i) {
        var n = this.childAt(0), r = this.childAt(1), a = this.childAt(2), l = t.hostModel, u = t.getItemModel(e),
            h = t.getItemLayout(e), c = o({}, h);
        c.label = null;
        var d = l.getShallow("animationTypeUpdate");
        if (i) {
            n.setShape(c);
            var f = l.getShallow("animationType");
            "scale" === f ? (n.shape.r = h.r0, to(n, {shape: {r: h.r}}, l, e)) : (n.shape.endAngle = h.startAngle, Ja(n, {shape: {endAngle: h.endAngle}}, l, e))
        } else "expansion" === d ? n.setShape(c) : Ja(n, {shape: c}, l, e);
        var p = t.getItemVisual(e, "color");
        n.useStyle(s({
            lineJoin: "bevel",
            fill: p
        }, u.getModel("itemStyle").getItemStyle())), n.hoverStyle = u.getModel("emphasis.itemStyle").getItemStyle();
        var g = u.getShallow("cursor");
        g && n.attr("cursor", g), Xd(this, t.getItemLayout(e), l.isSelected(t.getName(e)), l.get("selectedOffset"), l.get("animation"));
        var m = !i && "transition" === d;
        this._updateLabel(t, e, m), this.highDownOnUpdate = l.get("silent") ? null : function (t, e) {
            var i = l.isAnimationEnabled() && u.get("hoverAnimation");
            "emphasis" === e ? (r.ignore = r.hoverIgnore, a.ignore = a.hoverIgnore, i && (n.stopAnimation(!0), n.animateTo({shape: {r: h.r + l.get("hoverOffset")}}, 300, "elasticOut"))) : (r.ignore = r.normalIgnore, a.ignore = a.normalIgnore, i && (n.stopAnimation(!0), n.animateTo({shape: {r: h.r}}, 300, "elasticOut")))
        }, Na(this)
    }, aM._updateLabel = function (t, e, i) {
        var n = this.childAt(1), r = this.childAt(2), a = t.hostModel, o = t.getItemModel(e), s = t.getItemLayout(e),
            l = s.label, u = t.getItemVisual(e, "color");
        if (!l || isNaN(l.x) || isNaN(l.y)) return void (r.ignore = r.normalIgnore = r.hoverIgnore = n.ignore = n.normalIgnore = n.hoverIgnore = !0);
        var h = {points: l.linePoints || [[l.x, l.y], [l.x, l.y], [l.x, l.y]]}, c = {x: l.x, y: l.y};
        i ? (Ja(n, {shape: h}, a, e), Ja(r, {style: c}, a, e)) : (n.attr({shape: h}), r.attr({style: c})), r.attr({
            rotation: l.rotation,
            origin: [l.x, l.y],
            z2: 10
        });
        var d = o.getModel("label"), f = o.getModel("emphasis.label"), p = o.getModel("labelLine"),
            g = o.getModel("emphasis.labelLine"), u = t.getItemVisual(e, "color");
        Ga(r.style, r.hoverStyle = {}, d, f, {
            labelFetcher: t.hostModel,
            labelDataIndex: e,
            defaultText: l.text,
            autoColor: u,
            useInsideStyle: !!l.inside
        }, {
            textAlign: l.textAlign,
            textVerticalAlign: l.verticalAlign,
            opacity: t.getItemVisual(e, "opacity")
        }), r.ignore = r.normalIgnore = !d.get("show"), r.hoverIgnore = !f.get("show"), n.ignore = n.normalIgnore = !p.get("show"), n.hoverIgnore = !g.get("show"), n.setStyle({
            stroke: u,
            opacity: t.getItemVisual(e, "opacity")
        }), n.setStyle(p.getModel("lineStyle").getLineStyle()), n.hoverStyle = g.getModel("lineStyle").getLineStyle();
        var m = p.get("smooth");
        m && m === !0 && (m = .4), n.setShape({smooth: m})
    }, h(Ud, am);
    var oM = (hl.extend({
        type: "pie", init: function () {
            var t = new am;
            this._sectorGroup = t
        }, render: function (t, e, i, n) {
            if (!n || n.from !== this.uid) {
                var r = t.getData(), a = this._data, o = this.group, s = e.get("animation"), l = !a,
                    u = t.get("animationType"), h = t.get("animationTypeUpdate"), c = x(Wd, this.uid, t, s, i),
                    d = t.get("selectedMode");
                if (r.diff(a).add(function (t) {
                    var e = new Ud(r, t);
                    l && "scale" !== u && e.eachChild(function (t) {
                        t.stopAnimation(!0)
                    }), d && e.on("click", c), r.setItemGraphicEl(t, e), o.add(e)
                }).update(function (t, e) {
                    var i = a.getItemGraphicEl(e);
                    l || "transition" === h || i.eachChild(function (t) {
                        t.stopAnimation(!0)
                    }), i.updateData(r, t), i.off("click"), d && i.on("click", c), o.add(i), r.setItemGraphicEl(t, i)
                }).remove(function (t) {
                    var e = a.getItemGraphicEl(t);
                    o.remove(e)
                }).execute(), s && r.count() > 0 && (l ? "scale" !== u : "transition" !== h)) {
                    for (var f = r.getItemLayout(0), p = 1; isNaN(f.startAngle) && p < r.count(); ++p) f = r.getItemLayout(p);
                    var g = Math.max(i.getWidth(), i.getHeight()) / 2, m = y(o.removeClipPath, o);
                    o.setClipPath(this._createClipPath(f.cx, f.cy, g, f.startAngle, f.clockwise, m, t, l))
                } else o.removeClipPath();
                this._data = r
            }
        }, dispose: function () {
        }, _createClipPath: function (t, e, i, n, r, a, o, s) {
            var l = new My({shape: {cx: t, cy: e, r0: 0, r: i, startAngle: n, endAngle: n, clockwise: r}}),
                u = s ? to : Ja;
            return u(l, {shape: {endAngle: n + (r ? 1 : -1) * Math.PI * 2}}, o, a), l
        }, containPoint: function (t, e) {
            var i = e.getData(), n = i.getItemLayout(0);
            if (n) {
                var r = t[0] - n.cx, a = t[1] - n.cy, o = Math.sqrt(r * r + a * a);
                return o <= n.r && o >= n.r0
            }
        }
    }), function (t, e) {
        f(e, function (e) {
            e.update = "updateView", wu(e, function (i, n) {
                var r = {};
                return n.eachComponent({mainType: "series", subType: t, query: i}, function (t) {
                    t[e.method] && t[e.method](i.name, i.dataIndex);
                    var n = t.getData();
                    n.each(function (e) {
                        var i = n.getName(e);
                        r[i] = t.isSelected(i) || !1
                    })
                }), {name: i.name, selected: r, seriesId: i.seriesId}
            })
        })
    }), sM = function (t) {
        return {
            getTargetSeries: function (e) {
                var i = {}, n = R();
                return e.eachSeriesByType(t, function (t) {
                    t.__paletteScope = i, n.set(t.uid, t)
                }), n
            }, reset: function (t) {
                var e = t.getRawData(), i = {}, n = t.getData();
                n.each(function (t) {
                    var e = n.getRawIndex(t);
                    i[e] = t
                }), e.each(function (r) {
                    var a, o = i[r], s = null != o && n.getItemVisual(o, "color", !0),
                        l = null != o && n.getItemVisual(o, "borderColor", !0);
                    if (s && l || (a = e.getItemModel(r)), !s) {
                        var u = a.get("itemStyle.color") || t.getColorFromPalette(e.getName(r) || r + "", t.__paletteScope, e.count());
                        null != o && n.setItemVisual(o, "color", u)
                    }
                    if (!l) {
                        var h = a.get("itemStyle.borderColor");
                        null != o && n.setItemVisual(o, "borderColor", h)
                    }
                })
            }
        }
    }, lM = Math.PI / 180, uM = function (t, e, i, n, r, a) {
        var o, s, l = t.getData(), u = [], h = !1, c = (t.get("minShowLabelAngle") || 0) * lM;
        l.each(function (n) {
            var a = l.getItemLayout(n), d = l.getItemModel(n), f = d.getModel("label"),
                p = f.get("position") || d.get("emphasis.label.position"), g = f.get("distanceToLabelLine"),
                m = f.get("alignTo"), v = wo(f.get("margin"), i), y = f.get("bleedMargin"), x = f.getFont(),
                _ = d.getModel("labelLine"), w = _.get("length");
            w = wo(w, i);
            var b = _.get("length2");
            if (b = wo(b, i), !(a.angle < c)) {
                var S, M, I, C, T = (a.startAngle + a.endAngle) / 2, D = Math.cos(T), A = Math.sin(T);
                o = a.cx, s = a.cy;
                var k = t.getFormattedLabel(n, "normal") || l.getName(n), P = Xi(k, x, C, "top"),
                    L = "inside" === p || "inner" === p;
                if ("center" === p) S = a.cx, M = a.cy, C = "center"; else {
                    var O = (L ? (a.r + a.r0) / 2 * D : a.r * D) + o, z = (L ? (a.r + a.r0) / 2 * A : a.r * A) + s;
                    if (S = O + 3 * D, M = z + 3 * A, !L) {
                        var B = O + D * (w + e - a.r), E = z + A * (w + e - a.r), N = B + (0 > D ? -1 : 1) * b, R = E;
                        S = "edge" === m ? 0 > D ? r + v : r + i - v : N + (0 > D ? -g : g), M = R, I = [[O, z], [B, E], [N, R]]
                    }
                    C = L ? "center" : "edge" === m ? D > 0 ? "right" : "left" : D > 0 ? "left" : "right"
                }
                var F, V = f.get("rotate");
                F = "number" == typeof V ? V * (Math.PI / 180) : V ? 0 > D ? -T + Math.PI : -T : 0, h = !!F, a.label = {
                    x: S,
                    y: M,
                    position: p,
                    height: P.height,
                    len: w,
                    len2: b,
                    linePoints: I,
                    textAlign: C,
                    verticalAlign: "middle",
                    rotation: F,
                    inside: L,
                    labelDistance: g,
                    labelAlignTo: m,
                    labelMargin: v,
                    bleedMargin: y,
                    textRect: P,
                    text: k,
                    font: x
                }, L || u.push(a.label)
            }
        }), !h && t.get("avoidLabelOverlap") && qd(u, o, s, e, i, n, r, a)
    }, hM = 2 * Math.PI, cM = Math.PI / 180, dM = function (t, e, i) {
        e.eachSeriesByType(t, function (t) {
            var e = t.getData(), n = e.mapDimension("value"), r = Zd(t, i), a = t.get("center"), o = t.get("radius");
            _(o) || (o = [0, o]), _(a) || (a = [a, a]);
            var s = wo(r.width, i.getWidth()), l = wo(r.height, i.getHeight()), u = Math.min(s, l),
                h = wo(a[0], s) + r.x, c = wo(a[1], l) + r.y, d = wo(o[0], u / 2), f = wo(o[1], u / 2),
                p = -t.get("startAngle") * cM, g = t.get("minAngle") * cM, m = 0;
            e.each(n, function (t) {
                !isNaN(t) && m++
            });
            var v = e.getSum(n), y = Math.PI / (v || m) * 2, x = t.get("clockwise"), w = t.get("roseType"),
                b = t.get("stillShowZeroSum"), S = e.getDataExtent(n);
            S[0] = 0;
            var M = hM, I = 0, C = p, T = x ? 1 : -1;
            if (e.each(n, function (t, i) {
                var n;
                if (isNaN(t)) return void e.setItemLayout(i, {
                    angle: 0 / 0,
                    startAngle: 0 / 0,
                    endAngle: 0 / 0,
                    clockwise: x,
                    cx: h,
                    cy: c,
                    r0: d,
                    r: w ? 0 / 0 : f,
                    viewRect: r
                });
                n = "area" !== w ? 0 === v && b ? y : t * y : hM / m, g > n ? (n = g, M -= g) : I += t;
                var a = C + T * n;
                e.setItemLayout(i, {
                    angle: n,
                    startAngle: C,
                    endAngle: a,
                    clockwise: x,
                    cx: h,
                    cy: c,
                    r0: d,
                    r: w ? _o(t, S, [d, f]) : f,
                    viewRect: r
                }), C = a
            }), hM > M && m) if (.001 >= M) {
                var D = hM / m;
                e.each(n, function (t, i) {
                    if (!isNaN(t)) {
                        var n = e.getItemLayout(i);
                        n.angle = D, n.startAngle = p + T * i * D, n.endAngle = p + T * (i + 1) * D
                    }
                })
            } else y = M / I, C = p, e.each(n, function (t, i) {
                if (!isNaN(t)) {
                    var n = e.getItemLayout(i), r = n.angle === g ? g : t * y;
                    n.startAngle = C, n.endAngle = C + T * r, C += T * r
                }
            });
            uM(t, f, r.width, r.height, r.x, r.y)
        })
    }, fM = function (t) {
        return {
            seriesType: t, reset: function (t, e) {
                var i = e.findComponents({mainType: "legend"});
                if (i && i.length) {
                    var n = t.getData();
                    n.filterSelf(function (t) {
                        for (var e = n.getName(t), r = 0; r < i.length; r++) if (!i[r].isSelected(e)) return !1;
                        return !0
                    })
                }
            }
        }
    };
    oM("pie", [{type: "pieToggleSelect", event: "pieselectchanged", method: "toggleSelected"}, {
        type: "pieSelect",
        event: "pieselected",
        method: "select"
    }, {
        type: "pieUnSelect",
        event: "pieunselected",
        method: "unSelect"
    }]), Iu(sM("pie")), Mu(x(dM, "pie")), xu(fM("pie")), m_.extend({
        type: "series.scatter",
        dependencies: ["grid", "polar", "geo", "singleAxis", "calendar"],
        getInitialData: function () {
            return ch(this.getSource(), this, {useEncodeDefaulter: !0})
        },
        brushSelector: "point",
        getProgressive: function () {
            var t = this.option.progressive;
            return null == t ? this.option.large ? 5e3 : this.get("progressive") : t
        },
        getProgressiveThreshold: function () {
            var t = this.option.progressiveThreshold;
            return null == t ? this.option.large ? 1e4 : this.get("progressiveThreshold") : t
        },
        defaultOption: {
            coordinateSystem: "cartesian2d",
            zlevel: 0,
            z: 2,
            legendHoverLink: !0,
            hoverAnimation: !0,
            symbolSize: 10,
            large: !1,
            largeThreshold: 2e3,
            itemStyle: {opacity: .8},
            clip: !0
        }
    });
    var pM = 4, gM = pa({
        shape: {points: null}, symbolProxy: null, softClipShape: null, buildPath: function (t, e) {
            var i = e.points, n = e.size, r = this.symbolProxy, a = r.shape, o = t.getContext ? t.getContext() : t,
                s = o && n[0] < pM;
            if (!s) for (var l = 0; l < i.length;) {
                var u = i[l++], h = i[l++];
                isNaN(u) || isNaN(h) || (!this.softClipShape || this.softClipShape.contain(u, h)) && (a.x = u - n[0] / 2, a.y = h - n[1] / 2, a.width = n[0], a.height = n[1], r.buildPath(t, a, !0))
            }
        }, afterBrush: function (t) {
            var e = this.shape, i = e.points, n = e.size, r = n[0] < pM;
            if (r) {
                this.setTransform(t);
                for (var a = 0; a < i.length;) {
                    var o = i[a++], s = i[a++];
                    isNaN(o) || isNaN(s) || (!this.softClipShape || this.softClipShape.contain(o, s)) && t.fillRect(o - n[0] / 2, s - n[1] / 2, n[0], n[1])
                }
                this.restoreTransform(t)
            }
        }, findDataIndex: function (t, e) {
            for (var i = this.shape, n = i.points, r = i.size, a = Math.max(r[0], 4), o = Math.max(r[1], 4), s = n.length / 2 - 1; s >= 0; s--) {
                var l = 2 * s, u = n[l] - a / 2, h = n[l + 1] - o / 2;
                if (t >= u && e >= h && u + a >= t && h + o >= e) return s
            }
            return -1
        }
    }), mM = Kd.prototype;
    mM.isPersistent = function () {
        return !this._incremental
    }, mM.updateData = function (t, e) {
        this.group.removeAll();
        var i = new gM({rectHover: !0, cursor: "default"});
        i.setShape({points: t.getLayout("symbolPoints")}), this._setCommon(i, t, !1, e), this.group.add(i), this._incremental = null
    }, mM.updateLayout = function (t) {
        if (!this._incremental) {
            var e = t.getLayout("symbolPoints");
            this.group.eachChild(function (t) {
                if (null != t.startIndex) {
                    var i = 2 * (t.endIndex - t.startIndex), n = 4 * t.startIndex * 2;
                    e = new Float32Array(e.buffer, n, i)
                }
                t.setShape("points", e)
            })
        }
    }, mM.incrementalPrepareUpdate = function (t) {
        this.group.removeAll(), this._clearIncremental(), t.count() > 2e6 ? (this._incremental || (this._incremental = new fa({silent: !0})), this.group.add(this._incremental)) : this._incremental = null
    }, mM.incrementalUpdate = function (t, e, i) {
        var n;
        this._incremental ? (n = new gM, this._incremental.addDisplayable(n, !0)) : (n = new gM({
            rectHover: !0,
            cursor: "default",
            startIndex: t.start,
            endIndex: t.end
        }), n.incremental = !0, this.group.add(n)), n.setShape({points: e.getLayout("symbolPoints")}), this._setCommon(n, e, !!this._incremental, i)
    }, mM._setCommon = function (t, e, i, n) {
        var r = e.hostModel;
        n = n || {};
        var a = e.getVisual("symbolSize");
        t.setShape("size", a instanceof Array ? a : [a, a]), t.softClipShape = n.clipShape || null, t.symbolProxy = Yh(e.getVisual("symbol"), 0, 0, 0, 0), t.setColor = t.symbolProxy.setColor;
        var o = t.shape.size[0] < pM;
        t.useStyle(r.getModel("itemStyle").getItemStyle(o ? ["color", "shadowBlur", "shadowColor"] : ["color"]));
        var s = e.getVisual("color");
        s && t.setColor(s), i || (t.seriesIndex = r.seriesIndex, t.on("mousemove", function (e) {
            t.dataIndex = null;
            var i = t.findDataIndex(e.offsetX, e.offsetY);
            i >= 0 && (t.dataIndex = i + (t.startIndex || 0))
        }))
    }, mM.remove = function () {
        this._clearIncremental(), this._incremental = null, this.group.removeAll()
    }, mM._clearIncremental = function () {
        var t = this._incremental;
        t && t.clearDisplaybles()
    }, Pu({
        type: "scatter", render: function (t) {
            var e = t.getData(), i = this._updateSymbolDraw(e, t);
            i.updateData(e, {clipShape: this._getClipShape(t)}), this._finished = !0
        }, incrementalPrepareRender: function (t) {
            var e = t.getData(), i = this._updateSymbolDraw(e, t);
            i.incrementalPrepareUpdate(e), this._finished = !1
        }, incrementalRender: function (t, e) {
            this._symbolDraw.incrementalUpdate(t, e.getData(), {clipShape: this._getClipShape(e)}), this._finished = t.end === e.getData().count()
        }, updateTransform: function (t) {
            var e = t.getData();
            if (this.group.dirty(), !this._finished || e.count() > 1e4 || !this._symbolDraw.isPersistent()) return {update: !0};
            var i = QS().reset(t);
            i.progress && i.progress({start: 0, end: e.count()}, e), this._symbolDraw.updateLayout(e)
        }, _getClipShape: function (t) {
            var e = t.coordinateSystem, i = e && e.getArea && e.getArea();
            return t.get("clip", !0) ? i : null
        }, _updateSymbolDraw: function (t, e) {
            var i = this._symbolDraw, n = e.pipelineContext, r = n.large;
            return i && r === this._isLargeDraw || (i && i.remove(), i = this._symbolDraw = r ? new Kd : new _d, this._isLargeDraw = r, this.group.removeAll()), this.group.add(i.group), i
        }, remove: function () {
            this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null
        }, dispose: function () {
        }
    }), Iu($S("scatter", "circle")), Mu(QS("scatter"));
    {
        var vM = (m_.extend({
            type: "series.gauge",
            getInitialData: function () {
                return iM(this, ["value"])
            },
            defaultOption: {
                zlevel: 0,
                z: 2,
                center: ["50%", "50%"],
                legendHoverLink: !0,
                radius: "75%",
                startAngle: 225,
                endAngle: -45,
                clockwise: !0,
                min: 0,
                max: 100,
                splitNumber: 10,
                axisLine: {show: !0, lineStyle: {color: [[.2, "#91c7ae"], [.8, "#63869e"], [1, "#c23531"]], width: 30}},
                splitLine: {show: !0, length: 30, lineStyle: {color: "#eee", width: 2, type: "solid"}},
                axisTick: {show: !0, splitNumber: 5, length: 8, lineStyle: {color: "#eee", width: 1, type: "solid"}},
                axisLabel: {show: !0, distance: 5, color: "auto"},
                pointer: {show: !0, length: "80%", width: 8},
                itemStyle: {color: "auto"},
                title: {show: !0, offsetCenter: [0, "-40%"], color: "#333", fontSize: 15},
                detail: {
                    show: !0,
                    backgroundColor: "rgba(0,0,0,0)",
                    borderWidth: 0,
                    borderColor: "#ccc",
                    width: 100,
                    height: null,
                    padding: [5, 10],
                    offsetCenter: [0, "40%"],
                    color: "auto",
                    fontSize: 30
                }
            }
        }), ta.extend({
            type: "echartsGaugePointer",
            shape: {angle: 0, width: 10, r: 10, x: 0, y: 0},
            buildPath: function (t, e) {
                var i = Math.cos, n = Math.sin, r = e.r, a = e.width, o = e.angle,
                    s = e.x - i(o) * a * (a >= r / 3 ? 1 : 2), l = e.y - n(o) * a * (a >= r / 3 ? 1 : 2);
                o = e.angle - Math.PI / 2, t.moveTo(s, l), t.lineTo(e.x + i(o) * a, e.y + n(o) * a), t.lineTo(e.x + i(e.angle) * r, e.y + n(e.angle) * r), t.lineTo(e.x - i(o) * a, e.y - n(o) * a), t.lineTo(s, l)
            }
        })), yM = 2 * Math.PI;
        hl.extend({
            type: "gauge", render: function (t, e, i) {
                this.group.removeAll();
                var n = t.get("axisLine.lineStyle.color"), r = $d(t, i);
                this._renderMain(t, e, i, n, r)
            }, dispose: function () {
            }, _renderMain: function (t, e, i, n, r) {
                for (var a = this.group, o = t.getModel("axisLine"), s = o.getModel("lineStyle"), l = t.get("clockwise"), u = -t.get("startAngle") / 180 * Math.PI, h = -t.get("endAngle") / 180 * Math.PI, c = (h - u) % yM, d = u, f = s.get("width"), p = o.get("show"), g = 0; p && g < n.length; g++) {
                    var m = Math.min(Math.max(n[g][0], 0), 1), h = u + c * m, v = new My({
                        shape: {
                            startAngle: d,
                            endAngle: h,
                            cx: r.cx,
                            cy: r.cy,
                            clockwise: l,
                            r0: r.r - f,
                            r: r.r
                        }, silent: !0
                    });
                    v.setStyle({fill: n[g][1]}), v.setStyle(s.getLineStyle(["color", "borderWidth", "borderColor"])), a.add(v), d = h
                }
                var y = function (t) {
                    if (0 >= t) return n[0][1];
                    for (var e = 0; e < n.length; e++) if (n[e][0] >= t && (0 === e ? 0 : n[e - 1][0]) < t) return n[e][1];
                    return n[e - 1][1]
                };
                if (!l) {
                    var x = u;
                    u = h, h = x
                }
                this._renderTicks(t, e, i, y, r, u, h, l), this._renderPointer(t, e, i, y, r, u, h, l), this._renderTitle(t, e, i, y, r), this._renderDetail(t, e, i, y, r)
            }, _renderTicks: function (t, e, i, n, r, a, o) {
                for (var s = this.group, l = r.cx, u = r.cy, h = r.r, c = +t.get("min"), d = +t.get("max"), f = t.getModel("splitLine"), p = t.getModel("axisTick"), g = t.getModel("axisLabel"), m = t.get("splitNumber"), v = p.get("splitNumber"), y = wo(f.get("length"), h), x = wo(p.get("length"), h), _ = a, w = (o - a) / m, b = w / v, S = f.getModel("lineStyle").getLineStyle(), M = p.getModel("lineStyle").getLineStyle(), I = 0; m >= I; I++) {
                    var C = Math.cos(_), T = Math.sin(_);
                    if (f.get("show")) {
                        var D = new zy({
                            shape: {x1: C * h + l, y1: T * h + u, x2: C * (h - y) + l, y2: T * (h - y) + u},
                            style: S,
                            silent: !0
                        });
                        "auto" === S.stroke && D.setStyle({stroke: n(I / m)}), s.add(D)
                    }
                    if (g.get("show")) {
                        var A = Qd(bo(I / m * (d - c) + c), g.get("formatter")), k = g.get("distance"), P = n(I / m);
                        s.add(new _y({
                            style: Wa({}, g, {
                                text: A,
                                x: C * (h - y - k) + l,
                                y: T * (h - y - k) + u,
                                textVerticalAlign: -.4 > T ? "top" : T > .4 ? "bottom" : "middle",
                                textAlign: -.4 > C ? "left" : C > .4 ? "right" : "center"
                            }, {autoColor: P}), silent: !0
                        }))
                    }
                    if (p.get("show") && I !== m) {
                        for (var L = 0; v >= L; L++) {
                            var C = Math.cos(_), T = Math.sin(_), O = new zy({
                                shape: {
                                    x1: C * h + l,
                                    y1: T * h + u,
                                    x2: C * (h - x) + l,
                                    y2: T * (h - x) + u
                                }, silent: !0, style: M
                            });
                            "auto" === M.stroke && O.setStyle({stroke: n((I + L / v) / m)}), s.add(O), _ += b
                        }
                        _ -= b
                    } else _ += w
                }
            }, _renderPointer: function (t, e, i, n, r, a, o) {
                var s = this.group, l = this._data;
                if (!t.get("pointer.show")) return void (l && l.eachItemGraphicEl(function (t) {
                    s.remove(t)
                }));
                var u = [+t.get("min"), +t.get("max")], h = [a, o], c = t.getData(), d = c.mapDimension("value");
                c.diff(l).add(function (e) {
                    var i = new vM({shape: {angle: a}});
                    to(i, {shape: {angle: _o(c.get(d, e), u, h, !0)}}, t), s.add(i), c.setItemGraphicEl(e, i)
                }).update(function (e, i) {
                    var n = l.getItemGraphicEl(i);
                    Ja(n, {shape: {angle: _o(c.get(d, e), u, h, !0)}}, t), s.add(n), c.setItemGraphicEl(e, n)
                }).remove(function (t) {
                    var e = l.getItemGraphicEl(t);
                    s.remove(e)
                }).execute(), c.eachItemGraphicEl(function (t, e) {
                    var i = c.getItemModel(e), a = i.getModel("pointer");
                    t.setShape({
                        x: r.cx,
                        y: r.cy,
                        width: wo(a.get("width"), r.r),
                        r: wo(a.get("length"), r.r)
                    }), t.useStyle(i.getModel("itemStyle").getItemStyle()), "auto" === t.style.fill && t.setStyle("fill", n(_o(c.get(d, e), u, [0, 1], !0))), Na(t, i.getModel("emphasis.itemStyle").getItemStyle())
                }), this._data = c
            }, _renderTitle: function (t, e, i, n, r) {
                var a = t.getData(), o = a.mapDimension("value"), s = t.getModel("title");
                if (s.get("show")) {
                    var l = s.get("offsetCenter"), u = r.cx + wo(l[0], r.r), h = r.cy + wo(l[1], r.r),
                        c = +t.get("min"), d = +t.get("max"), f = t.getData().get(o, 0),
                        p = n(_o(f, [c, d], [0, 1], !0));
                    this.group.add(new _y({
                        silent: !0,
                        style: Wa({}, s, {
                            x: u,
                            y: h,
                            text: a.getName(0),
                            textAlign: "center",
                            textVerticalAlign: "middle"
                        }, {autoColor: p, forceRich: !0})
                    }))
                }
            }, _renderDetail: function (t, e, i, n, r) {
                var a = t.getModel("detail"), o = +t.get("min"), s = +t.get("max");
                if (a.get("show")) {
                    var l = a.get("offsetCenter"), u = r.cx + wo(l[0], r.r), h = r.cy + wo(l[1], r.r),
                        c = wo(a.get("width"), r.r), d = wo(a.get("height"), r.r), f = t.getData(),
                        p = f.get(f.mapDimension("value"), 0), g = n(_o(p, [o, s], [0, 1], !0));
                    this.group.add(new _y({
                        silent: !0,
                        style: Wa({}, a, {
                            x: u,
                            y: h,
                            text: Qd(p, a.get("formatter")),
                            textWidth: isNaN(c) ? null : c,
                            textHeight: isNaN(d) ? null : d,
                            textAlign: "center",
                            textVerticalAlign: "middle"
                        }, {autoColor: g, forceRich: !0})
                    }))
                }
            }
        })
    }
    Du({
        type: "title",
        layoutMode: {type: "box", ignoreSize: !0},
        defaultOption: {
            zlevel: 0,
            z: 6,
            show: !0,
            text: "",
            target: "blank",
            subtext: "",
            subtarget: "blank",
            left: 0,
            top: 0,
            backgroundColor: "rgba(0,0,0,0)",
            borderColor: "#ccc",
            borderWidth: 0,
            padding: 5,
            itemGap: 10,
            textStyle: {fontSize: 18, fontWeight: "bolder", color: "#333"},
            subtextStyle: {color: "#aaa"}
        }
    }), Au({
        type: "title", render: function (t, e, i) {
            if (this.group.removeAll(), t.get("show")) {
                var n = this.group, r = t.getModel("textStyle"), a = t.getModel("subtextStyle"), o = t.get("textAlign"),
                    s = A(t.get("textBaseline"), t.get("textVerticalAlign")), l = new _y({
                        style: Wa({}, r, {text: t.get("text"), textFill: r.getTextColor()}, {disableBox: !0}),
                        z2: 10
                    }), u = l.getBoundingRect(), h = t.get("subtext"), c = new _y({
                        style: Wa({}, a, {
                            text: h,
                            textFill: a.getTextColor(),
                            y: u.height + t.get("itemGap"),
                            textVerticalAlign: "top"
                        }, {disableBox: !0}), z2: 10
                    }), d = t.get("link"), f = t.get("sublink"), p = t.get("triggerEvent", !0);
                l.silent = !d && !p, c.silent = !f && !p, d && l.on("click", function () {
                    jo(d, "_" + t.get("target"))
                }), f && c.on("click", function () {
                    jo(f, "_" + t.get("subtarget"))
                }), l.eventData = c.eventData = p ? {
                    componentType: "title",
                    componentIndex: t.componentIndex
                } : null, n.add(l), h && n.add(c);
                var g = n.getBoundingRect(), m = t.getBoxLayoutParams();
                m.width = g.width, m.height = g.height;
                var v = Ko(m, {width: i.getWidth(), height: i.getHeight()}, t.get("padding"));
                o || (o = t.get("left") || t.get("right"), "middle" === o && (o = "center"), "right" === o ? v.x += v.width : "center" === o && (v.x += v.width / 2)), s || (s = t.get("top") || t.get("bottom"), "center" === s && (s = "middle"), "bottom" === s ? v.y += v.height : "middle" === s && (v.y += v.height / 2), s = s || "top"), n.attr("position", [v.x, v.y]);
                var y = {textAlign: o, textVerticalAlign: s};
                l.setStyle(y), c.setStyle(y), g = n.getBoundingRect();
                var x = v.margin, _ = t.getItemStyle(["color", "opacity"]);
                _.fill = t.get("backgroundColor");
                var w = new Ly({
                    shape: {
                        x: g.x - x[3],
                        y: g.y - x[0],
                        width: g.width + x[1] + x[3],
                        height: g.height + x[0] + x[2],
                        r: t.get("borderRadius")
                    }, style: _, subPixelOptimize: !0, silent: !0
                });
                n.add(w)
            }
        }
    });
    var xM = D_.legend.selector,
        _M = {all: {type: "all", title: n(xM.all)}, inverse: {type: "inverse", title: n(xM.inverse)}}, wM = Du({
            type: "legend.plain",
            dependencies: ["series"],
            layoutMode: {type: "box", ignoreSize: !0},
            init: function (t, e, i) {
                this.mergeDefaultAndTheme(t, i), t.selected = t.selected || {}, this._updateSelector(t)
            },
            mergeOption: function (t) {
                wM.superCall(this, "mergeOption", t), this._updateSelector(t)
            },
            _updateSelector: function (t) {
                var e = t.selector;
                e === !0 && (e = t.selector = ["all", "inverse"]), _(e) && f(e, function (t, i) {
                    b(t) && (t = {type: t}), e[i] = r(t, _M[t.type])
                })
            },
            optionUpdated: function () {
                this._updateData(this.ecModel);
                var t = this._data;
                if (t[0] && "single" === this.get("selectedMode")) {
                    for (var e = !1, i = 0; i < t.length; i++) {
                        var n = t[i].get("name");
                        if (this.isSelected(n)) {
                            this.select(n), e = !0;
                            break
                        }
                    }
                    !e && this.select(t[0].get("name"))
                }
            },
            _updateData: function (t) {
                var e = [], i = [];
                t.eachRawSeries(function (n) {
                    var r = n.name;
                    i.push(r);
                    var a;
                    if (n.legendVisualProvider) {
                        var o = n.legendVisualProvider, s = o.getAllNames();
                        t.isSeriesFiltered(n) || (i = i.concat(s)), s.length ? e = e.concat(s) : a = !0
                    } else a = !0;
                    a && ar(n) && e.push(n.name)
                }), this._availableNames = i;
                var n = this.get("data") || e, r = p(n, function (t) {
                    return ("string" == typeof t || "number" == typeof t) && (t = {name: t}), new fo(t, this, this.ecModel)
                }, this);
                this._data = r
            },
            getData: function () {
                return this._data
            },
            select: function (t) {
                var e = this.option.selected, i = this.get("selectedMode");
                if ("single" === i) {
                    var n = this._data;
                    f(n, function (t) {
                        e[t.get("name")] = !1
                    })
                }
                e[t] = !0
            },
            unSelect: function (t) {
                "single" !== this.get("selectedMode") && (this.option.selected[t] = !1)
            },
            toggleSelected: function (t) {
                var e = this.option.selected;
                e.hasOwnProperty(t) || (e[t] = !0), this[e[t] ? "unSelect" : "select"](t)
            },
            allSelect: function () {
                var t = this._data, e = this.option.selected;
                f(t, function (t) {
                    e[t.get("name", !0)] = !0
                })
            },
            inverseSelect: function () {
                var t = this._data, e = this.option.selected;
                f(t, function (t) {
                    var i = t.get("name", !0);
                    e.hasOwnProperty(i) || (e[i] = !0), e[i] = !e[i]
                })
            },
            isSelected: function (t) {
                var e = this.option.selected;
                return !(e.hasOwnProperty(t) && !e[t]) && u(this._availableNames, t) >= 0
            },
            getOrient: function () {
                return "vertical" === this.get("orient") ? {index: 1, name: "vertical"} : {index: 0, name: "horizontal"}
            },
            defaultOption: {
                zlevel: 0,
                z: 4,
                show: !0,
                orient: "horizontal",
                left: "center",
                top: 0,
                align: "auto",
                backgroundColor: "rgba(0,0,0,0)",
                borderColor: "#ccc",
                borderRadius: 0,
                borderWidth: 0,
                padding: 5,
                itemGap: 10,
                itemWidth: 25,
                itemHeight: 14,
                inactiveColor: "#ccc",
                inactiveBorderColor: "#ccc",
                itemStyle: {borderWidth: 0},
                textStyle: {color: "#333"},
                selectedMode: !0,
                selector: !1,
                selectorLabel: {
                    show: !0,
                    borderRadius: 10,
                    padding: [3, 5, 3, 5],
                    fontSize: 12,
                    fontFamily: " sans-serif",
                    color: "#666",
                    borderWidth: 1,
                    borderColor: "#666"
                },
                emphasis: {selectorLabel: {show: !0, color: "#eee", backgroundColor: "#666"}},
                selectorPosition: "auto",
                selectorItemGap: 7,
                selectorButtonGap: 10,
                tooltip: {show: !1}
            }
        });
    wu("legendToggleSelect", "legendselectchanged", x(Jd, "toggleSelected")), wu("legendAllSelect", "legendselectall", x(Jd, "allSelect")), wu("legendInverseSelect", "legendinverseselect", x(Jd, "inverseSelect")), wu("legendSelect", "legendselected", x(Jd, "select")), wu("legendUnSelect", "legendunselected", x(Jd, "unSelect"));
    var bM = x, SM = f, MM = am, IM = Au({
        type: "legend.plain", newlineDisabled: !1, init: function () {
            this.group.add(this._contentGroup = new MM), this._backgroundEl, this.group.add(this._selectorGroup = new MM), this._isFirstRender = !0
        }, getContentGroup: function () {
            return this._contentGroup
        }, getSelectorGroup: function () {
            return this._selectorGroup
        }, render: function (t, e, i) {
            var n = this._isFirstRender;
            if (this._isFirstRender = !1, this.resetInner(), t.get("show", !0)) {
                var r = t.get("align"), a = t.get("orient");
                r && "auto" !== r || (r = "right" === t.get("left") && "vertical" === a ? "right" : "left");
                var o = t.get("selector", !0), l = t.get("selectorPosition", !0);
                !o || l && "auto" !== l || (l = "horizontal" === a ? "end" : "start"), this.renderInner(r, t, e, i, o, a, l);
                var u = t.getBoxLayoutParams(), h = {width: i.getWidth(), height: i.getHeight()}, c = t.get("padding"),
                    d = Ko(u, h, c), f = this.layoutInner(t, r, d, n, o, l),
                    p = Ko(s({width: f.width, height: f.height}, u), h, c);
                this.group.attr("position", [p.x - f.x, p.y - f.y]), this.group.add(this._backgroundEl = tf(f, t))
            }
        }, resetInner: function () {
            this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl), this.getSelectorGroup().removeAll()
        }, renderInner: function (t, e, i, n, r, a, o) {
            var s = this.getContentGroup(), l = R(), u = e.get("selectedMode"), h = [];
            i.eachRawSeries(function (t) {
                !t.get("legendHoverLink") && h.push(t.id)
            }), SM(e.getData(), function (r, a) {
                var o = r.get("name");
                if (!this.newlineDisabled && ("" === o || "\n" === o)) return void s.add(new MM({newline: !0}));
                var c = i.getSeriesByName(o)[0];
                if (!l.get(o)) if (c) {
                    var d = c.getData(), f = d.getVisual("color"), p = d.getVisual("borderColor");
                    "function" == typeof f && (f = f(c.getDataParams(0))), "function" == typeof p && (p = p(c.getDataParams(0)));
                    var g = d.getVisual("legendSymbol") || "roundRect", m = d.getVisual("symbol"),
                        v = this._createItem(o, a, r, e, g, m, t, f, p, u);
                    v.on("click", bM(nf, o, null, n, h)).on("mouseover", bM(rf, c.name, null, n, h)).on("mouseout", bM(af, c.name, null, n, h)), l.set(o, !0)
                } else i.eachRawSeries(function (i) {
                    if (!l.get(o) && i.legendVisualProvider) {
                        var s = i.legendVisualProvider;
                        if (!s.containName(o)) return;
                        var c = s.indexOfName(o), d = s.getItemVisual(c, "color"),
                            f = s.getItemVisual(c, "borderColor"), p = "roundRect",
                            g = this._createItem(o, a, r, e, p, null, t, d, f, u);
                        g.on("click", bM(nf, null, o, n, h)).on("mouseover", bM(rf, null, o, n, h)).on("mouseout", bM(af, null, o, n, h)), l.set(o, !0)
                    }
                }, this)
            }, this), r && this._createSelector(r, e, n, a, o)
        }, _createSelector: function (t, e, i) {
            function n(t) {
                var n = t.type, a = new _y({
                    style: {x: 0, y: 0, align: "center", verticalAlign: "middle"}, onclick: function () {
                        i.dispatchAction({type: "all" === n ? "legendAllSelect" : "legendInverseSelect"})
                    }
                });
                r.add(a);
                var o = e.getModel("selectorLabel"), s = e.getModel("emphasis.selectorLabel");
                Ga(a.style, a.hoverStyle = {}, o, s, {defaultText: t.title, isRectText: !1}), Na(a)
            }

            var r = this.getSelectorGroup();
            SM(t, function (t) {
                n(t)
            })
        }, _createItem: function (t, e, i, n, r, a, s, l, u, h) {
            var c = n.get("itemWidth"), d = n.get("itemHeight"), f = n.get("inactiveColor"),
                p = n.get("inactiveBorderColor"), g = n.get("symbolKeepAspect"), m = n.getModel("itemStyle"),
                v = n.isSelected(t), y = new MM, x = i.getModel("textStyle"), _ = i.get("icon"),
                w = i.getModel("tooltip"), b = w.parentModel;
            r = _ || r;
            var S = Yh(r, 0, 0, c, d, v ? l : f, null == g ? !0 : g);
            if (y.add(ef(S, r, m, u, p, v)), !_ && a && (a !== r || "none" === a)) {
                var M = .8 * d;
                "none" === a && (a = "circle");
                var I = Yh(a, (c - M) / 2, (d - M) / 2, M, M, v ? l : f, null == g ? !0 : g);
                y.add(ef(I, a, m, u, p, v))
            }
            var C = "left" === s ? c + 5 : -5, T = s, D = n.get("formatter"), A = t;
            "string" == typeof D && D ? A = D.replace("{name}", null != t ? t : "") : "function" == typeof D && (A = D(t)), y.add(new _y({
                style: Wa({}, x, {
                    text: A,
                    x: C,
                    y: d / 2,
                    textFill: v ? x.getTextColor() : f,
                    textAlign: T,
                    textVerticalAlign: "middle"
                })
            }));
            var k = new Ly({
                shape: y.getBoundingRect(),
                invisible: !0,
                tooltip: w.get("show") ? o({
                    content: t,
                    formatter: b.get("formatter", !0) || function () {
                        return t
                    },
                    formatterParams: {componentType: "legend", legendIndex: n.componentIndex, name: t, $vars: ["name"]}
                }, w.option) : null
            });
            return y.add(k), y.eachChild(function (t) {
                t.silent = !0
            }), k.silent = !h, this.getContentGroup().add(y), Na(y), y.__legendDataIndex = e, y
        }, layoutInner: function (t, e, i, n, r, a) {
            var o = this.getContentGroup(), s = this.getSelectorGroup();
            Cx(t.get("orient"), o, t.get("itemGap"), i.width, i.height);
            var l = o.getBoundingRect(), u = [-l.x, -l.y];
            if (r) {
                Cx("horizontal", s, t.get("selectorItemGap", !0));
                var h = s.getBoundingRect(), c = [-h.x, -h.y], d = t.get("selectorButtonGap", !0),
                    f = t.getOrient().index, p = 0 === f ? "width" : "height", g = 0 === f ? "height" : "width",
                    m = 0 === f ? "y" : "x";
                "end" === a ? c[f] += l[p] + d : u[f] += h[p] + d, c[1 - f] += l[g] / 2 - h[g] / 2, s.attr("position", c), o.attr("position", u);
                var v = {x: 0, y: 0};
                return v[p] = l[p] + d + h[p], v[g] = Math.max(l[g], h[g]), v[m] = Math.min(0, h[m] + c[1 - f]), v
            }
            return o.attr("position", u), this.group.getBoundingRect()
        }, remove: function () {
            this.getContentGroup().removeAll(), this._isFirstRender = !0
        }
    }), CM = function (t) {
        var e = t.findComponents({mainType: "legend"});
        e && e.length && t.filterSeries(function (t) {
            for (var i = 0; i < e.length; i++) if (!e[i].isSelected(t.name)) return !1;
            return !0
        })
    };
    xu(_w.PROCESSOR.SERIES_FILTER, CM), Ax.registerSubTypeDefaulter("legend", function () {
        return "plain"
    });
    var TM = wM.extend({
        type: "legend.scroll",
        setScrollDataIndex: function (t) {
            this.option.scrollDataIndex = t
        },
        defaultOption: {
            scrollDataIndex: 0,
            pageButtonItemGap: 5,
            pageButtonGap: null,
            pageButtonPosition: "end",
            pageFormatter: "{current}/{total}",
            pageIcons: {
                horizontal: ["M0,0L12,-10L12,10z", "M0,0L-12,-10L-12,10z"],
                vertical: ["M0,0L20,0L10,-20z", "M0,0L20,0L10,20z"]
            },
            pageIconColor: "#2f4554",
            pageIconInactiveColor: "#aaa",
            pageIconSize: 15,
            pageTextStyle: {color: "#333"},
            animationDurationUpdate: 800
        },
        init: function (t, e, i, n) {
            var r = Qo(t);
            TM.superCall(this, "init", t, e, i, n), of(this, t, r)
        },
        mergeOption: function (t, e) {
            TM.superCall(this, "mergeOption", t, e), of(this, this.option, t)
        }
    }), DM = am, AM = ["width", "height"], kM = ["x", "y"], PM = IM.extend({
        type: "legend.scroll", newlineDisabled: !0, init: function () {
            PM.superCall(this, "init"), this._currentIndex = 0, this.group.add(this._containerGroup = new DM), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new DM), this._showController
        }, resetInner: function () {
            PM.superCall(this, "resetInner"), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null
        }, renderInner: function (t, e, i, n, r, a, o) {
            function s(t, i) {
                var r = t + "DataIndex",
                    a = so(e.get("pageIcons", !0)[e.getOrient().name][i], {onclick: y(l._pageGo, l, r, e, n)}, {
                        x: -h[0] / 2,
                        y: -h[1] / 2,
                        width: h[0],
                        height: h[1]
                    });
                a.name = t, u.add(a)
            }

            var l = this;
            PM.superCall(this, "renderInner", t, e, i, n, r, a, o);
            var u = this._controllerGroup, h = e.get("pageIconSize", !0);
            _(h) || (h = [h, h]), s("pagePrev", 0);
            var c = e.getModel("pageTextStyle");
            u.add(new _y({
                name: "pageText",
                style: {
                    textFill: c.getTextColor(),
                    font: c.getFont(),
                    textVerticalAlign: "middle",
                    textAlign: "center"
                },
                silent: !0
            })), s("pageNext", 1)
        }, layoutInner: function (t, e, i, r, a, o) {
            var s = this.getSelectorGroup(), l = t.getOrient().index, u = AM[l], h = kM[l], c = AM[1 - l],
                d = kM[1 - l];
            a && Cx("horizontal", s, t.get("selectorItemGap", !0));
            var f = t.get("selectorButtonGap", !0), p = s.getBoundingRect(), g = [-p.x, -p.y], m = n(i);
            a && (m[u] = i[u] - p[u] - f);
            var v = this._layoutContentAndController(t, r, m, l, u, c, d);
            if (a) {
                if ("end" === o) g[l] += v[u] + f; else {
                    var y = p[u] + f;
                    g[l] -= y, v[h] -= y
                }
                v[u] += p[u] + f, g[1 - l] += v[d] + v[c] / 2 - p[c] / 2, v[c] = Math.max(v[c], p[c]), v[d] = Math.min(v[d], p[d] + g[1 - l]), s.attr("position", g)
            }
            return v
        }, _layoutContentAndController: function (t, e, i, n, r, a, o) {
            var s = this.getContentGroup(), l = this._containerGroup, u = this._controllerGroup;
            Cx(t.get("orient"), s, t.get("itemGap"), n ? i.width : null, n ? null : i.height), Cx("horizontal", u, t.get("pageButtonItemGap", !0));
            var h = s.getBoundingRect(), c = u.getBoundingRect(), d = this._showController = h[r] > i[r],
                f = [-h.x, -h.y];
            e || (f[n] = s.position[n]);
            var p = [0, 0], g = [-c.x, -c.y], m = A(t.get("pageButtonGap", !0), t.get("itemGap", !0));
            if (d) {
                var v = t.get("pageButtonPosition", !0);
                "end" === v ? g[n] += i[r] - c[r] : p[n] += c[r] + m
            }
            g[1 - n] += h[a] / 2 - c[a] / 2, s.attr("position", f), l.attr("position", p), u.attr("position", g);
            var y = {x: 0, y: 0};
            if (y[r] = d ? i[r] : h[r], y[a] = Math.max(h[a], c[a]), y[o] = Math.min(0, c[o] + g[1 - n]), l.__rectSize = i[r], d) {
                var x = {x: 0, y: 0};
                x[r] = Math.max(i[r] - c[r] - m, 0), x[a] = y[a], l.setClipPath(new Ly({shape: x})), l.__rectSize = x[r]
            } else u.eachChild(function (t) {
                t.attr({invisible: !0, silent: !0})
            });
            var _ = this._getPageInfo(t);
            return null != _.pageIndex && Ja(s, {position: _.contentPosition}, d ? t : !1), this._updatePageInfoView(t, _), y
        }, _pageGo: function (t, e, i) {
            var n = this._getPageInfo(e)[t];
            null != n && i.dispatchAction({type: "legendScroll", scrollDataIndex: n, legendId: e.id})
        }, _updatePageInfoView: function (t, e) {
            var i = this._controllerGroup;
            f(["pagePrev", "pageNext"], function (n) {
                var r = null != e[n + "DataIndex"], a = i.childOfName(n);
                a && (a.setStyle("fill", r ? t.get("pageIconColor", !0) : t.get("pageIconInactiveColor", !0)), a.cursor = r ? "pointer" : "default")
            });
            var n = i.childOfName("pageText"), r = t.get("pageFormatter"), a = e.pageIndex, o = null != a ? a + 1 : 0,
                s = e.pageCount;
            n && r && n.setStyle("text", b(r) ? r.replace("{current}", o).replace("{total}", s) : r({
                current: o,
                total: s
            }))
        }, _getPageInfo: function (t) {
            function e(t) {
                if (t) {
                    var e = t.getBoundingRect(), i = e[l] + t.position[o];
                    return {s: i, e: i + e[s], i: t.__legendDataIndex}
                }
            }

            function i(t, e) {
                return t.e >= e && t.s <= e + a
            }

            var n = t.get("scrollDataIndex", !0), r = this.getContentGroup(), a = this._containerGroup.__rectSize,
                o = t.getOrient().index, s = AM[o], l = kM[o], u = this._findTargetItemIndex(n), h = r.children(),
                c = h[u], d = h.length, f = d ? 1 : 0, p = {
                    contentPosition: r.position.slice(),
                    pageCount: f,
                    pageIndex: f - 1,
                    pagePrevDataIndex: null,
                    pageNextDataIndex: null
                };
            if (!c) return p;
            var g = e(c);
            p.contentPosition[o] = -g.s;
            for (var m = u + 1, v = g, y = g, x = null; d >= m; ++m) x = e(h[m]), (!x && y.e > v.s + a || x && !i(x, v.s)) && (v = y.i > v.i ? y : x, v && (null == p.pageNextDataIndex && (p.pageNextDataIndex = v.i), ++p.pageCount)), y = x;
            for (var m = u - 1, v = g, y = g, x = null; m >= -1; --m) x = e(h[m]), x && i(y, x.s) || !(v.i < y.i) || (y = v, null == p.pagePrevDataIndex && (p.pagePrevDataIndex = v.i), ++p.pageCount, ++p.pageIndex), v = x;
            return p
        }, _findTargetItemIndex: function (t) {
            if (!this._showController) return 0;
            var e, i, n = this.getContentGroup();
            return n.eachChild(function (n, r) {
                var a = n.__legendDataIndex;
                null == i && null != a && (i = r), a === t && (e = r)
            }), null != e ? e : i
        }
    });
    wu("legendScroll", "legendscroll", function (t, e) {
        var i = t.scrollDataIndex;
        null != i && e.eachComponent({mainType: "legend", subType: "scroll", query: t}, function (t) {
            t.setScrollDataIndex(i)
        })
    });
    var LM = function (t, e) {
        var i, n = [], r = t.seriesIndex;
        if (null == r || !(i = e.getSeriesByIndex(r))) return {point: []};
        var a = i.getData(), o = sr(a, t);
        if (null == o || 0 > o || _(o)) return {point: []};
        var s = a.getItemGraphicEl(o), l = i.coordinateSystem;
        if (i.getTooltipPosition) n = i.getTooltipPosition(o) || []; else if (l && l.dataToPoint) n = l.dataToPoint(a.getValues(p(l.dimensions, function (t) {
            return a.mapDimension(t)
        }), o, !0)) || []; else if (s) {
            var u = s.getBoundingRect().clone();
            u.applyTransform(s.transform), n = [u.x + u.width / 2, u.y + u.height / 2]
        }
        return {point: n, el: s}
    }, OM = f, zM = x, BM = lr(), EM = function (t, e, i) {
        var n = t.currTrigger, r = [t.x, t.y], a = t, o = t.dispatchAction || y(i.dispatchAction, i),
            s = e.getComponent("axisPointer").coordSysAxesInfo;
        if (s) {
            mf(r) && (r = LM({seriesIndex: a.seriesIndex, dataIndex: a.dataIndex}, e).point);
            var l = mf(r), u = a.axesInfo, h = s.axesInfo, c = "leave" === n || mf(r), d = {}, f = {},
                p = {list: [], map: {}}, g = {showPointer: zM(uf, f), showTooltip: zM(hf, p)};
            OM(s.coordSysMap, function (t, e) {
                var i = l || t.containPoint(r);
                OM(s.coordSysAxesInfo[e], function (t) {
                    var e = t.axis, n = pf(u, t);
                    if (!c && i && (!u || n)) {
                        var a = n && n.value;
                        null != a || l || (a = e.pointToData(r)), null != a && sf(t, a, g, !1, d)
                    }
                })
            });
            var m = {};
            return OM(h, function (t, e) {
                var i = t.linkGroup;
                i && !f[e] && OM(i.axesInfo, function (e, n) {
                    var r = f[n];
                    if (e !== t && r) {
                        var a = r.value;
                        i.mapper && (a = t.axis.scale.parse(i.mapper(a, gf(e), gf(t)))), m[t.key] = a
                    }
                })
            }), OM(m, function (t, e) {
                sf(h[e], t, g, !0, d)
            }), cf(f, h, d), df(p, r, t, o), ff(h, o, i), d
        }
    }, NM = (Du({
        type: "axisPointer",
        coordSysAxesInfo: null,
        defaultOption: {
            show: "auto",
            triggerOn: null,
            zlevel: 0,
            z: 50,
            type: "line",
            snap: !1,
            triggerTooltip: !0,
            value: null,
            status: null,
            link: [],
            animation: null,
            animationDurationUpdate: 200,
            lineStyle: {color: "#aaa", width: 1, type: "solid"},
            shadowStyle: {color: "rgba(150,150,150,0.3)"},
            label: {
                show: !0,
                formatter: null,
                precision: "auto",
                margin: 3,
                color: "#fff",
                padding: [5, 7, 5, 7],
                backgroundColor: "auto",
                borderColor: null,
                borderWidth: 0,
                shadowBlur: 3,
                shadowColor: "#aaa"
            },
            handle: {
                show: !1,
                icon: "M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",
                size: 45,
                margin: 50,
                color: "#333",
                shadowBlur: 3,
                shadowColor: "#aaa",
                shadowOffsetX: 0,
                shadowOffsetY: 2,
                throttle: 40
            }
        }
    }), lr()), RM = f, FM = Au({
        type: "axisPointer", render: function (t, e, i) {
            var n = e.getComponent("tooltip"), r = t.get("triggerOn") || n && n.get("triggerOn") || "mousemove|click";
            vf("axisPointer", i, function (t, e, i) {
                "none" !== r && ("leave" === t || r.indexOf(t) >= 0) && i({
                    type: "updateAxisPointer",
                    currTrigger: t,
                    x: e && e.offsetX,
                    y: e && e.offsetY
                })
            })
        }, remove: function (t, e) {
            Sf(e.getZr(), "axisPointer"), FM.superApply(this._model, "remove", arguments)
        }, dispose: function (t, e) {
            Sf("axisPointer", e), FM.superApply(this._model, "dispose", arguments)
        }
    }), VM = lr(), GM = n, HM = y;
    Mf.prototype = {
        _group: null,
        _lastGraphicKey: null,
        _handle: null,
        _dragging: !1,
        _lastValue: null,
        _lastStatus: null,
        _payloadInfo: null,
        animationThreshold: 15,
        render: function (t, e, i, n) {
            var r = e.get("value"), a = e.get("status");
            if (this._axisModel = t, this._axisPointerModel = e, this._api = i, n || this._lastValue !== r || this._lastStatus !== a) {
                this._lastValue = r, this._lastStatus = a;
                var o = this._group, s = this._handle;
                if (!a || "hide" === a) return o && o.hide(), void (s && s.hide());
                o && o.show(), s && s.show();
                var l = {};
                this.makeElOption(l, r, t, e, i);
                var u = l.graphicKey;
                u !== this._lastGraphicKey && this.clear(i), this._lastGraphicKey = u;
                var h = this._moveAnimation = this.determineAnimation(t, e);
                if (o) {
                    var c = x(If, e, h);
                    this.updatePointerEl(o, l, c, e), this.updateLabelEl(o, l, c, e)
                } else o = this._group = new am, this.createPointerEl(o, l, t, e), this.createLabelEl(o, l, t, e), i.getZr().add(o);
                Af(o, e, !0), this._renderHandle(r)
            }
        },
        remove: function (t) {
            this.clear(t)
        },
        dispose: function (t) {
            this.clear(t)
        },
        determineAnimation: function (t, e) {
            var i = e.get("animation"), n = t.axis, r = "category" === n.type, a = e.get("snap");
            if (!a && !r) return !1;
            if ("auto" === i || null == i) {
                var o = this.animationThreshold;
                if (r && n.getBandWidth() > o) return !0;
                if (a) {
                    var s = sd(t).seriesDataCount, l = n.getExtent();
                    return Math.abs(l[0] - l[1]) / s > o
                }
                return !1
            }
            return i === !0
        },
        makeElOption: function () {
        },
        createPointerEl: function (t, e) {
            var i = e.pointer;
            if (i) {
                var n = VM(t).pointerEl = new nx[i.type](GM(e.pointer));
                t.add(n)
            }
        },
        createLabelEl: function (t, e, i, n) {
            if (e.label) {
                var r = VM(t).labelEl = new Ly(GM(e.label));
                t.add(r), Tf(r, n)
            }
        },
        updatePointerEl: function (t, e, i) {
            var n = VM(t).pointerEl;
            n && e.pointer && (n.setStyle(e.pointer.style), i(n, {shape: e.pointer.shape}))
        },
        updateLabelEl: function (t, e, i, n) {
            var r = VM(t).labelEl;
            r && (r.setStyle(e.label.style), i(r, {shape: e.label.shape, position: e.label.position}), Tf(r, n))
        },
        _renderHandle: function (t) {
            if (!this._dragging && this.updateHandleTransform) {
                var e = this._axisPointerModel, i = this._api.getZr(), n = this._handle, r = e.getModel("handle"),
                    a = e.get("status");
                if (!r.get("show") || !a || "hide" === a) return n && i.remove(n), void (this._handle = null);
                var o;
                this._handle || (o = !0, n = this._handle = so(r.get("icon"), {
                    cursor: "move",
                    draggable: !0,
                    onmousemove: function (t) {
                        _g(t.event)
                    },
                    onmousedown: HM(this._onHandleDragMove, this, 0, 0),
                    drift: HM(this._onHandleDragMove, this),
                    ondragend: HM(this._onHandleDragEnd, this)
                }), i.add(n)), Af(n, e, !1);
                var s = ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"];
                n.setStyle(r.getItemStyle(null, s));
                var l = r.get("size");
                _(l) || (l = [l, l]), n.attr("scale", [l[0] / 2, l[1] / 2]), ml(this, "_doDispatchAxisPointer", r.get("throttle") || 0, "fixRate"), this._moveHandleToValue(t, o)
            }
        },
        _moveHandleToValue: function (t, e) {
            If(this._axisPointerModel, !e && this._moveAnimation, this._handle, Df(this.getHandleTransform(t, this._axisModel, this._axisPointerModel)))
        },
        _onHandleDragMove: function (t, e) {
            var i = this._handle;
            if (i) {
                this._dragging = !0;
                var n = this.updateHandleTransform(Df(i), [t, e], this._axisModel, this._axisPointerModel);
                this._payloadInfo = n, i.stopAnimation(), i.attr(Df(n)), VM(i).lastProp = null, this._doDispatchAxisPointer()
            }
        },
        _doDispatchAxisPointer: function () {
            var t = this._handle;
            if (t) {
                var e = this._payloadInfo, i = this._axisModel;
                this._api.dispatchAction({
                    type: "updateAxisPointer",
                    x: e.cursorPoint[0],
                    y: e.cursorPoint[1],
                    tooltipOption: e.tooltipOption,
                    axesInfo: [{axisDim: i.axis.dim, axisIndex: i.componentIndex}]
                })
            }
        },
        _onHandleDragEnd: function () {
            this._dragging = !1;
            var t = this._handle;
            if (t) {
                var e = this._axisPointerModel.get("value");
                this._moveHandleToValue(e), this._api.dispatchAction({type: "hideTip"})
            }
        },
        getHandleTransform: null,
        updateHandleTransform: null,
        clear: function (t) {
            this._lastValue = null, this._lastStatus = null;
            var e = t.getZr(), i = this._group, n = this._handle;
            e && i && (this._lastGraphicKey = null, i && e.remove(i), n && e.remove(n), this._group = null, this._handle = null, this._payloadInfo = null)
        },
        doClear: function () {
        },
        buildLabel: function (t, e, i) {
            return i = i || 0, {x: t[i], y: t[1 - i], width: e[i], height: e[1 - i]}
        }
    }, Mf.prototype.constructor = Mf, mr(Mf);
    var WM = Mf.extend({
        makeElOption: function (t, e, i, n, r) {
            var a = i.axis, o = a.grid, s = n.get("type"), l = Rf(o, a).getOtherAxis(a).getGlobalExtent(),
                u = a.toGlobalCoord(a.dataToCoord(e, !0));
            if (s && "none" !== s) {
                var h = kf(n), c = XM[s](a, u, l);
                c.style = h, t.graphicKey = c.type, t.pointer = c
            }
            var d = fd(o.model, i);
            Bf(e, t, d, i, n, r)
        }, getHandleTransform: function (t, e, i) {
            var n = fd(e.axis.grid.model, e, {labelInside: !1});
            return n.labelMargin = i.get("handle.margin"), {
                position: zf(e.axis, t, n),
                rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0)
            }
        }, updateHandleTransform: function (t, e, i) {
            var n = i.axis, r = n.grid, a = n.getGlobalExtent(!0), o = Rf(r, n).getOtherAxis(n).getGlobalExtent(),
                s = "x" === n.dim ? 0 : 1, l = t.position;
            l[s] += e[s], l[s] = Math.min(a[1], l[s]), l[s] = Math.max(a[0], l[s]);
            var u = (o[1] + o[0]) / 2, h = [u, u];
            h[s] = l[s];
            var c = [{verticalAlign: "middle"}, {align: "center"}];
            return {position: l, rotation: t.rotation, cursorPoint: h, tooltipOption: c[s]}
        }
    }), XM = {
        line: function (t, e, i) {
            var n = Ef([e, i[0]], [e, i[1]], Ff(t));
            return {type: "Line", subPixelOptimize: !0, shape: n}
        }, shadow: function (t, e, i) {
            var n = Math.max(1, t.getBandWidth()), r = i[1] - i[0];
            return {type: "Rect", shape: Nf([e - n / 2, i[0]], [n, r], Ff(t))}
        }
    };
    AS.registerAxisPointerClass("CartesianAxisPointer", WM), yu(function (t) {
        if (t) {
            (!t.axisPointer || 0 === t.axisPointer.length) && (t.axisPointer = {});
            var e = t.axisPointer.link;
            e && !_(e) && (t.axisPointer.link = [e])
        }
    }), xu(_w.PROCESSOR.STATISTIC, function (t, e) {
        t.getComponent("axisPointer").coordSysAxesInfo = td(t, e)
    }), wu({
        type: "updateAxisPointer",
        event: "updateAxisPointer",
        update: ":updateAxisPointer"
    }, EM), Du({
        type: "tooltip",
        dependencies: ["axisPointer"],
        defaultOption: {
            zlevel: 0,
            z: 60,
            show: !0,
            showContent: !0,
            trigger: "item",
            triggerOn: "mousemove|click",
            alwaysShowContent: !1,
            displayMode: "single",
            renderMode: "auto",
            confine: !1,
            showDelay: 0,
            hideDelay: 100,
            transitionDuration: .4,
            enterable: !1,
            backgroundColor: "rgba(50,50,50,0.7)",
            borderColor: "#333",
            borderRadius: 4,
            borderWidth: 0,
            padding: 5,
            extraCssText: "",
            axisPointer: {
                type: "line",
                axis: "auto",
                animation: "auto",
                animationDurationUpdate: 200,
                animationEasingUpdate: "exponentialOut",
                crossStyle: {color: "#999", width: 1, type: "dashed", textStyle: {}}
            },
            textStyle: {color: "#fff", fontSize: 14}
        }
    });
    var UM = f, YM = Ro, qM = ["", "-webkit-", "-moz-", "-o-"],
        jM = "position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;";
    Xf.prototype = {
        constructor: Xf, _enterable: !0, update: function (t) {
            var e = this._container, i = e.currentStyle || document.defaultView.getComputedStyle(e), n = e.style;
            "absolute" !== n.position && "absolute" !== i.position && (n.position = "relative");
            var r = t.get("alwaysShowContent");
            r && this._moveTooltipIfResized()
        }, _moveTooltipIfResized: function () {
            var t = this._styleCoord[2], e = this._styleCoord[3], i = t * this._zr.getWidth(),
                n = e * this._zr.getHeight();
            this.moveTo(i, n)
        }, show: function (t) {
            clearTimeout(this._hideTimeout);
            var e = this.el, i = this._styleCoord;
            e.style.cssText = jM + Hf(t) + ";left:" + i[0] + "px;top:" + i[1] + "px;" + (t.get("extraCssText") || ""), e.style.display = e.innerHTML ? "block" : "none", e.style.pointerEvents = this._enterable ? "auto" : "none", this._show = !0
        }, setContent: function (t) {
            this.el.innerHTML = null == t ? "" : t
        }, setEnterable: function (t) {
            this._enterable = t
        }, getSize: function () {
            var t = this.el;
            return [t.clientWidth, t.clientHeight]
        }, moveTo: function (t, e) {
            var i = this._styleCoord;
            Wf(i, this._zr, this._appendToBody, t, e);
            var n = this.el.style;
            n.left = i[0] + "px", n.top = i[1] + "px"
        }, hide: function () {
            this.el.style.display = "none", this._show = !1
        }, hideLater: function (t) {
            !this._show || this._inContent && this._enterable || (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout = setTimeout(y(this.hide, this), t)) : this.hide())
        }, isShow: function () {
            return this._show
        }, dispose: function () {
            this.el.parentNode.removeChild(this.el)
        }, getOuterSize: function () {
            var t = this.el.clientWidth, e = this.el.clientHeight;
            if (document.defaultView && document.defaultView.getComputedStyle) {
                var i = document.defaultView.getComputedStyle(this.el);
                i && (t += parseInt(i.borderLeftWidth, 10) + parseInt(i.borderRightWidth, 10), e += parseInt(i.borderTopWidth, 10) + parseInt(i.borderBottomWidth, 10))
            }
            return {width: t, height: e}
        }
    }, Yf.prototype = {
        constructor: Yf, _enterable: !0, update: function (t) {
            var e = t.get("alwaysShowContent");
            e && this._moveTooltipIfResized()
        }, _moveTooltipIfResized: function () {
            var t = this._styleCoord[2], e = this._styleCoord[3], i = t * this._zr.getWidth(),
                n = e * this._zr.getHeight();
            this.moveTo(i, n)
        }, show: function () {
            this._hideTimeout && clearTimeout(this._hideTimeout), this.el.attr("show", !0), this._show = !0
        }, setContent: function (t, e, i) {
            this.el && this._zr.remove(this.el);
            for (var n = {}, r = t, a = "{marker", o = "|}", s = r.indexOf(a); s >= 0;) {
                var l = r.indexOf(o), u = r.substr(s + a.length, l - s - a.length);
                n["marker" + u] = u.indexOf("sub") > -1 ? {
                    textWidth: 4,
                    textHeight: 4,
                    textBorderRadius: 2,
                    textBackgroundColor: e[u],
                    textOffset: [3, 0]
                } : {
                    textWidth: 10,
                    textHeight: 10,
                    textBorderRadius: 5,
                    textBackgroundColor: e[u]
                }, r = r.substr(l + 1), s = r.indexOf("{marker")
            }
            var h = i.getModel("textStyle"), c = h.get("fontSize"), d = i.get("textLineHeight");
            null == d && (d = Math.round(3 * c / 2)), this.el = new _y({
                style: Wa({}, h, {
                    rich: n,
                    text: t,
                    textBackgroundColor: i.get("backgroundColor"),
                    textBorderRadius: i.get("borderRadius"),
                    textFill: i.get("textStyle.color"),
                    textPadding: i.get("padding"),
                    textLineHeight: d
                }), z: i.get("z")
            }), this._zr.add(this.el);
            var f = this;
            this.el.on("mouseover", function () {
                f._enterable && (clearTimeout(f._hideTimeout), f._show = !0), f._inContent = !0
            }), this.el.on("mouseout", function () {
                f._enterable && f._show && f.hideLater(f._hideDelay), f._inContent = !1
            })
        }, setEnterable: function (t) {
            this._enterable = t
        }, getSize: function () {
            var t = this.el.getBoundingRect();
            return [t.width, t.height]
        }, moveTo: function (t, e) {
            if (this.el) {
                var i = this._styleCoord;
                Uf(i, this._zr, t, e), this.el.attr("position", [i[0], i[1]])
            }
        }, hide: function () {
            this.el && this.el.hide(), this._show = !1
        }, hideLater: function (t) {
            !this._show || this._inContent && this._enterable || (t ? (this._hideDelay = t, this._show = !1, this._hideTimeout = setTimeout(y(this.hide, this), t)) : this.hide())
        }, isShow: function () {
            return this._show
        }, dispose: function () {
            clearTimeout(this._hideTimeout), this.el && this._zr.remove(this.el)
        }, getOuterSize: function () {
            var t = this.getSize();
            return {width: t[0], height: t[1]}
        }
    };
    var ZM = y, KM = f, $M = wo, QM = new Ly({shape: {x: -1, y: -1, width: 2, height: 2}});
    Au({
        type: "tooltip", init: function (t, e) {
            if (!Up.node) {
                var i = t.getComponent("tooltip"), n = i.get("renderMode");
                this._renderMode = fr(n);
                var r;
                "html" === this._renderMode ? (r = new Xf(e.getDom(), e, {appendToBody: i.get("appendToBody", !0)}), this._newLine = "<br/>") : (r = new Yf(e), this._newLine = "\n"), this._tooltipContent = r
            }
        }, render: function (t, e, i) {
            if (!Up.node) {
                this.group.removeAll(), this._tooltipModel = t, this._ecModel = e, this._api = i, this._lastDataByCoordSys = null, this._alwaysShowContent = t.get("alwaysShowContent");
                var n = this._tooltipContent;
                n.update(t), n.setEnterable(t.get("enterable")), this._initGlobalListener(), this._keepShow()
            }
        }, _initGlobalListener: function () {
            var t = this._tooltipModel, e = t.get("triggerOn");
            vf("itemTooltip", this._api, ZM(function (t, i, n) {
                "none" !== e && (e.indexOf(t) >= 0 ? this._tryShow(i, n) : "leave" === t && this._hide(n))
            }, this))
        }, _keepShow: function () {
            var t = this._tooltipModel, e = this._ecModel, i = this._api;
            if (null != this._lastX && null != this._lastY && "none" !== t.get("triggerOn")) {
                var n = this;
                clearTimeout(this._refreshUpdateTimeout), this._refreshUpdateTimeout = setTimeout(function () {
                    !i.isDisposed() && n.manuallyShowTip(t, e, i, {x: n._lastX, y: n._lastY})
                })
            }
        }, manuallyShowTip: function (t, e, i, n) {
            if (n.from !== this.uid && !Up.node) {
                var r = jf(n, i);
                this._ticket = "";
                var a = n.dataByCoordSys;
                if (n.tooltip && null != n.x && null != n.y) {
                    var o = QM;
                    o.position = [n.x, n.y], o.update(), o.tooltip = n.tooltip, this._tryShow({
                        offsetX: n.x,
                        offsetY: n.y,
                        target: o
                    }, r)
                } else if (a) this._tryShow({
                    offsetX: n.x,
                    offsetY: n.y,
                    position: n.position,
                    dataByCoordSys: n.dataByCoordSys,
                    tooltipOption: n.tooltipOption
                }, r); else if (null != n.seriesIndex) {
                    if (this._manuallyAxisShowTip(t, e, i, n)) return;
                    var s = LM(n, e), l = s.point[0], u = s.point[1];
                    null != l && null != u && this._tryShow({
                        offsetX: l,
                        offsetY: u,
                        position: n.position,
                        target: s.el
                    }, r)
                } else null != n.x && null != n.y && (i.dispatchAction({
                    type: "updateAxisPointer",
                    x: n.x,
                    y: n.y
                }), this._tryShow({
                    offsetX: n.x,
                    offsetY: n.y,
                    position: n.position,
                    target: i.getZr().findHover(n.x, n.y).target
                }, r))
            }
        }, manuallyHideTip: function (t, e, i, n) {
            var r = this._tooltipContent;
            !this._alwaysShowContent && this._tooltipModel && r.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = null, n.from !== this.uid && this._hide(jf(n, i))
        }, _manuallyAxisShowTip: function (t, e, i, n) {
            var r = n.seriesIndex, a = n.dataIndex, o = e.getComponent("axisPointer").coordSysAxesInfo;
            if (null != r && null != a && null != o) {
                var s = e.getSeriesByIndex(r);
                if (s) {
                    var l = s.getData(), t = qf([l.getItemModel(a), s, (s.coordinateSystem || {}).model, t]);
                    if ("axis" === t.get("trigger")) return i.dispatchAction({
                        type: "updateAxisPointer",
                        seriesIndex: r,
                        dataIndex: a,
                        position: n.position
                    }), !0
                }
            }
        }, _tryShow: function (t, e) {
            var i = t.target, n = this._tooltipModel;
            if (n) {
                this._lastX = t.offsetX, this._lastY = t.offsetY;
                var r = t.dataByCoordSys;
                r && r.length ? this._showAxisTooltip(r, t) : i && null != i.dataIndex ? (this._lastDataByCoordSys = null, this._showSeriesItemTooltip(t, i, e)) : i && i.tooltip ? (this._lastDataByCoordSys = null, this._showComponentItemTooltip(t, i, e)) : (this._lastDataByCoordSys = null, this._hide(e))
            }
        }, _showOrMove: function (t, e) {
            var i = t.get("showDelay");
            e = y(e, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(e, i) : e()
        }, _showAxisTooltip: function (t, e) {
            var i = this._ecModel, n = this._tooltipModel, a = [e.offsetX, e.offsetY], o = [], s = [],
                l = qf([e.tooltipOption, n]), u = this._renderMode, h = this._newLine, c = {};
            KM(t, function (t) {
                KM(t.dataByAxis, function (t) {
                    var e = i.getComponent(t.axisDim + "Axis", t.axisIndex), n = t.value, a = [];
                    if (e && null != n) {
                        var l = Of(n, e.axis, i, t.seriesDataIndices, t.valueLabelOpt);
                        f(t.seriesDataIndices, function (o) {
                            var h = i.getSeriesByIndex(o.seriesIndex), d = o.dataIndexInside,
                                f = h && h.getDataParams(d);
                            if (f.axisDim = t.axisDim, f.axisIndex = t.axisIndex, f.axisType = t.axisType, f.axisId = t.axisId, f.axisValue = Vh(e.axis, n), f.axisValueLabel = l, f) {
                                s.push(f);
                                var p, g = h.formatTooltip(d, !0, null, u);
                                if (S(g)) {
                                    p = g.html;
                                    var m = g.markers;
                                    r(c, m)
                                } else p = g;
                                a.push(p)
                            }
                        });
                        var d = l;
                        o.push("html" !== u ? a.join(h) : (d ? Fo(d) + h : "") + a.join(h))
                    }
                })
            }, this), o.reverse(), o = o.join(this._newLine + this._newLine);
            var d = e.position;
            this._showOrMove(l, function () {
                this._updateContentNotChangedOnAxis(t) ? this._updatePosition(l, d, a[0], a[1], this._tooltipContent, s) : this._showTooltipContent(l, o, s, Math.random(), a[0], a[1], d, void 0, c)
            })
        }, _showSeriesItemTooltip: function (t, e, i) {
            var n = this._ecModel, r = e.seriesIndex, a = n.getSeriesByIndex(r), o = e.dataModel || a, s = e.dataIndex,
                l = e.dataType, u = o.getData(l),
                h = qf([u.getItemModel(s), o, a && (a.coordinateSystem || {}).model, this._tooltipModel]),
                c = h.get("trigger");
            if (null == c || "item" === c) {
                var d, f, p = o.getDataParams(s, l), g = o.formatTooltip(s, !1, l, this._renderMode);
                S(g) ? (d = g.html, f = g.markers) : (d = g, f = null);
                var m = "item_" + o.name + "_" + s;
                this._showOrMove(h, function () {
                    this._showTooltipContent(h, d, p, m, t.offsetX, t.offsetY, t.position, t.target, f)
                }), i({
                    type: "showTip",
                    dataIndexInside: s,
                    dataIndex: u.getRawIndex(s),
                    seriesIndex: r,
                    from: this.uid
                })
            }
        }, _showComponentItemTooltip: function (t, e, i) {
            var n = e.tooltip;
            if ("string" == typeof n) {
                var r = n;
                n = {content: r, formatter: r}
            }
            var a = new fo(n, this._tooltipModel, this._ecModel), o = a.get("content"), s = Math.random();
            this._showOrMove(a, function () {
                this._showTooltipContent(a, o, a.get("formatterParams") || {}, s, t.offsetX, t.offsetY, t.position, e)
            }), i({type: "showTip", from: this.uid})
        }, _showTooltipContent: function (t, e, i, n, r, a, o, s, l) {
            if (this._ticket = "", t.get("showContent") && t.get("show")) {
                var u = this._tooltipContent, h = t.get("formatter");
                o = o || t.get("position");
                var c = e;
                if (h && "string" == typeof h) c = Vo(h, i, !0); else if ("function" == typeof h) {
                    var d = ZM(function (e, n) {
                        e === this._ticket && (u.setContent(n, l, t), this._updatePosition(t, o, r, a, u, i, s))
                    }, this);
                    this._ticket = n, c = h(i, n, d)
                }
                u.setContent(c, l, t), u.show(t), this._updatePosition(t, o, r, a, u, i, s)
            }
        }, _updatePosition: function (t, e, i, n, r, a, o) {
            var s = this._api.getWidth(), l = this._api.getHeight();
            e = e || t.get("position");
            var u = r.getSize(), h = t.get("align"), c = t.get("verticalAlign"), d = o && o.getBoundingRect().clone();
            if (o && d.applyTransform(o.transform), "function" == typeof e && (e = e([i, n], a, r.el, d, {
                viewSize: [s, l],
                contentSize: u.slice()
            })), _(e)) i = $M(e[0], s), n = $M(e[1], l); else if (S(e)) {
                e.width = u[0], e.height = u[1];
                var f = Ko(e, {width: s, height: l});
                i = f.x, n = f.y, h = null, c = null
            } else if ("string" == typeof e && o) {
                var p = $f(e, d, u);
                i = p[0], n = p[1]
            } else {
                var p = Zf(i, n, r, s, l, h ? null : 20, c ? null : 20);
                i = p[0], n = p[1]
            }
            if (h && (i -= Qf(h) ? u[0] / 2 : "right" === h ? u[0] : 0), c && (n -= Qf(c) ? u[1] / 2 : "bottom" === c ? u[1] : 0), t.get("confine")) {
                var p = Kf(i, n, r, s, l);
                i = p[0], n = p[1]
            }
            r.moveTo(i, n)
        }, _updateContentNotChangedOnAxis: function (t) {
            var e = this._lastDataByCoordSys, i = !!e && e.length === t.length;
            return i && KM(e, function (e, n) {
                var r = e.dataByAxis || {}, a = t[n] || {}, o = a.dataByAxis || [];
                i &= r.length === o.length, i && KM(r, function (t, e) {
                    var n = o[e] || {}, r = t.seriesDataIndices || [], a = n.seriesDataIndices || [];
                    i &= t.value === n.value && t.axisType === n.axisType && t.axisId === n.axisId && r.length === a.length, i && KM(r, function (t, e) {
                        var n = a[e];
                        i &= t.seriesIndex === n.seriesIndex && t.dataIndex === n.dataIndex
                    })
                })
            }), this._lastDataByCoordSys = t, !!i
        }, _hide: function (t) {
            this._lastDataByCoordSys = null, t({type: "hideTip", from: this.uid})
        }, dispose: function (t, e) {
            Up.node || (this._tooltipContent.dispose(), Sf("itemTooltip", e))
        }
    }), wu({type: "showTip", event: "showTip", update: "tooltip:manuallyShowTip"}, function () {
    }), wu({type: "hideTip", event: "hideTip", update: "tooltip:manuallyHideTip"}, function () {
    });
    var JM = No, tI = Fo, eI = Du({
        type: "marker", dependencies: ["series", "grid", "polar", "geo"], init: function (t, e, i) {
            this.mergeDefaultAndTheme(t, i), this._mergeOption(t, i, !1, !0)
        }, isAnimationEnabled: function () {
            if (Up.node) return !1;
            var t = this.__hostSeries;
            return this.getShallow("animation") && t && t.isAnimationEnabled()
        }, mergeOption: function (t, e) {
            this._mergeOption(t, e, !1, !1)
        }, _mergeOption: function (t, e, i, n) {
            var r = this.constructor, a = this.mainType + "Model";
            i || e.eachSeries(function (t) {
                var i = t.get(this.mainType, !0), s = t[a];
                return i && i.data ? (s ? s._mergeOption(i, e, !0) : (n && Jf(i), f(i.data, function (t) {
                    t instanceof Array ? (Jf(t[0]), Jf(t[1])) : Jf(t)
                }), s = new r(i, this, e), o(s, {
                    mainType: this.mainType,
                    seriesIndex: t.seriesIndex,
                    name: t.name,
                    createdBySelf: !0
                }), s.__hostSeries = t), void (t[a] = s)) : void (t[a] = null)
            }, this)
        }, formatTooltip: function (t, e, i, n) {
            var r = this.getData(), a = this.getRawValue(t), o = _(a) ? p(a, JM).join(", ") : JM(a), s = r.getName(t),
                l = tI(this.name), u = "html" === n ? "<br/>" : "\n";
            return (null != a || s) && (l += u), s && (l += tI(s), null != a && (l += " : ")), null != a && (l += tI(o)), l
        }, getData: function () {
            return this._data
        }, setData: function (t) {
            this._data = t
        }
    });
    c(eI, d_), eI.extend({
        type: "markPoint",
        defaultOption: {
            zlevel: 0,
            z: 5,
            symbol: "pin",
            symbolSize: 50,
            tooltip: {trigger: "item"},
            label: {show: !0, position: "inside"},
            itemStyle: {borderWidth: 2},
            emphasis: {label: {show: !0}}
        }
    });
    var iI = u, nI = x, rI = {min: nI(ip, "min"), max: nI(ip, "max"), average: nI(ip, "average")}, aI = Au({
        type: "marker", init: function () {
            this.markerGroupMap = R()
        }, render: function (t, e, i) {
            var n = this.markerGroupMap;
            n.each(function (t) {
                t.__keep = !1
            });
            var r = this.type + "Model";
            e.eachSeries(function (t) {
                var n = t[r];
                n && this.renderSeries(t, n, e, i)
            }, this), n.each(function (t) {
                !t.__keep && this.group.remove(t.group)
            }, this)
        }, renderSeries: function () {
        }
    });
    aI.extend({
        type: "markPoint", updateTransform: function (t, e, i) {
            e.eachSeries(function (t) {
                var e = t.markPointModel;
                e && (up(e.getData(), t, i), this.markerGroupMap.get(t.id).updateLayout(e))
            }, this)
        }, renderSeries: function (t, e, i, n) {
            var r = t.coordinateSystem, a = t.id, o = t.getData(), s = this.markerGroupMap,
                l = s.get(a) || s.set(a, new _d), u = hp(r, t, e);
            e.setData(u), up(e.getData(), t, n), u.each(function (t) {
                var i = u.getItemModel(t), n = i.getShallow("symbol"), r = i.getShallow("symbolSize"),
                    a = i.getShallow("symbolRotate"), s = w(n), l = w(r), h = w(a);
                if (s || l || h) {
                    var c = e.getRawValue(t), d = e.getDataParams(t);
                    s && (n = n(c, d)), l && (r = r(c, d)), h && (a = a(c, d))
                }
                u.setItemVisual(t, {
                    symbol: n,
                    symbolSize: r,
                    symbolRotate: a,
                    color: i.get("itemStyle.color") || o.getVisual("color")
                })
            }), l.updateData(u), this.group.add(l.group), u.eachItemGraphicEl(function (t) {
                t.traverse(function (t) {
                    t.dataModel = e
                })
            }), l.__keep = !0, l.group.silent = e.get("silent") || t.get("silent")
        }
    }), yu(function (t) {
        t.markPoint = t.markPoint || {}
    }), eI.extend({
        type: "markLine",
        defaultOption: {
            zlevel: 0,
            z: 5,
            symbol: ["circle", "arrow"],
            symbolSize: [8, 16],
            precision: 2,
            tooltip: {trigger: "item"},
            label: {show: !0, position: "end", distance: 5},
            lineStyle: {type: "dashed"},
            emphasis: {label: {show: !0}, lineStyle: {width: 3}},
            animationEasing: "linear"
        }
    });
    var oI = zy.prototype, sI = Ey.prototype, lI = pa({
        type: "ec-line",
        style: {stroke: "#000", fill: null},
        shape: {x1: 0, y1: 0, x2: 0, y2: 0, percent: 1, cpx1: null, cpy1: null},
        buildPath: function (t, e) {
            this[cp(e) ? "_buildPathLine" : "_buildPathCurve"](t, e)
        },
        _buildPathLine: oI.buildPath,
        _buildPathCurve: sI.buildPath,
        pointAt: function (t) {
            return this[cp(this.shape) ? "_pointAtLine" : "_pointAtCurve"](t)
        },
        _pointAtLine: oI.pointAt,
        _pointAtCurve: sI.pointAt,
        tangentAt: function (t) {
            var e = this.shape, i = cp(e) ? [e.x2 - e.x1, e.y2 - e.y1] : this._tangentAtCurve(t);
            return te(i, i)
        },
        _tangentAtCurve: sI.tangentAt
    }), uI = ["fromSymbol", "toSymbol"], hI = vp.prototype;
    hI.beforeUpdate = mp, hI._createLine = function (t, e, i) {
        var n = t.hostModel, r = t.getItemLayout(e), a = pp(r);
        a.shape.percent = 0, to(a, {shape: {percent: 1}}, n, e), this.add(a);
        var o = new _y({name: "label", lineLabelOriginalOpacity: 1});
        this.add(o), f(uI, function (i) {
            var n = fp(i, t, e);
            this.add(n), this[dp(i)] = t.getItemVisual(e, i)
        }, this), this._updateCommonStl(t, e, i)
    }, hI.updateData = function (t, e, i) {
        var n = t.hostModel, r = this.childOfName("line"), a = t.getItemLayout(e), o = {shape: {}};
        gp(o.shape, a), Ja(r, o, n, e), f(uI, function (i) {
            var n = t.getItemVisual(e, i), r = dp(i);
            if (this[r] !== n) {
                this.remove(this.childOfName(i));
                var a = fp(i, t, e);
                this.add(a)
            }
            this[r] = n
        }, this), this._updateCommonStl(t, e, i)
    }, hI._updateCommonStl = function (t, e, i) {
        var n = t.hostModel, r = this.childOfName("line"), a = i && i.lineStyle, o = i && i.hoverLineStyle,
            l = i && i.labelModel, u = i && i.hoverLabelModel;
        if (!i || t.hasItemOption) {
            var h = t.getItemModel(e);
            a = h.getModel("lineStyle").getLineStyle(), o = h.getModel("emphasis.lineStyle").getLineStyle(), l = h.getModel("label"), u = h.getModel("emphasis.label")
        }
        var c = t.getItemVisual(e, "color"), d = k(t.getItemVisual(e, "opacity"), a.opacity, 1);
        r.useStyle(s({
            strokeNoScale: !0,
            fill: "none",
            stroke: c,
            opacity: d
        }, a)), r.hoverStyle = o, f(uI, function (t) {
            var e = this.childOfName(t);
            e && (e.setColor(c), e.setStyle({opacity: d}))
        }, this);
        var p, g, m = l.getShallow("show"), v = u.getShallow("show"), y = this.childOfName("label");
        if ((m || v) && (p = c || "#000", g = n.getFormattedLabel(e, "normal", t.dataType), null == g)) {
            var x = n.getRawValue(e);
            g = null == x ? t.getName(e) : isFinite(x) ? bo(x) : x
        }
        var w = m ? g : null, b = v ? A(n.getFormattedLabel(e, "emphasis", t.dataType), g) : null, S = y.style;
        if (null != w || null != b) {
            Wa(y.style, l, {text: w}, {autoColor: p}), y.__textAlign = S.textAlign, y.__verticalAlign = S.textVerticalAlign, y.__position = l.get("position") || "middle";
            var M = l.get("distance");
            _(M) || (M = [M, M]), y.__labelDistance = M
        }
        y.hoverStyle = null != b ? {
            text: b,
            textFill: u.getTextColor(!0),
            fontStyle: u.getShallow("fontStyle"),
            fontWeight: u.getShallow("fontWeight"),
            fontSize: u.getShallow("fontSize"),
            fontFamily: u.getShallow("fontFamily")
        } : {text: null}, y.ignore = !m && !v, Na(this)
    }, hI.highlight = function () {
        this.trigger("emphasis")
    }, hI.downplay = function () {
        this.trigger("normal")
    }, hI.updateLayout = function (t, e) {
        this.setLinePoints(t.getItemLayout(e))
    }, hI.setLinePoints = function (t) {
        var e = this.childOfName("line");
        gp(e.shape, t), e.dirty()
    }, h(vp, am);
    var cI = yp.prototype;
    cI.isPersistent = function () {
        return !0
    }, cI.updateData = function (t) {
        var e = this, i = e.group, n = e._lineData;
        e._lineData = t, n || i.removeAll();
        var r = bp(t);
        t.diff(n).add(function (i) {
            xp(e, t, i, r)
        }).update(function (i, a) {
            _p(e, n, t, a, i, r)
        }).remove(function (t) {
            i.remove(n.getItemGraphicEl(t))
        }).execute()
    }, cI.updateLayout = function () {
        var t = this._lineData;
        t && t.eachItemGraphicEl(function (e, i) {
            e.updateLayout(t, i)
        }, this)
    }, cI.incrementalPrepareUpdate = function (t) {
        this._seriesScope = bp(t), this._lineData = null, this.group.removeAll()
    }, cI.incrementalUpdate = function (t, e) {
        function i(t) {
            t.isGroup || wp(t) || (t.incremental = t.useHoverLayer = !0)
        }

        for (var n = t.start; n < t.end; n++) {
            var r = e.getItemLayout(n);
            if (Mp(r)) {
                var a = new this._ctor(e, n, this._seriesScope);
                a.traverse(i), this.group.add(a), e.setItemGraphicEl(n, a)
            }
        }
    }, cI.remove = function () {
        this._clearIncremental(), this._incremental = null, this.group.removeAll()
    }, cI._clearIncremental = function () {
        var t = this._incremental;
        t && t.clearDisplaybles()
    };
    var dI = function (t, e, i, a) {
        var s = t.getData(), l = a.type;
        if (!_(a) && ("min" === l || "max" === l || "average" === l || "median" === l || null != a.xAxis || null != a.yAxis)) {
            var u, h;
            if (null != a.yAxis || null != a.xAxis) u = e.getAxis(null != a.yAxis ? "y" : "x"), h = D(a.yAxis, a.xAxis); else {
                var c = rp(a, s, e, t);
                u = c.valueAxis;
                var d = hh(s, c.valueDataDim);
                h = lp(s, d, l)
            }
            var f = "x" === u.dim ? 0 : 1, p = 1 - f, g = n(a), m = {};
            g.type = null, g.coord = [], m.coord = [], g.coord[p] = -1 / 0, m.coord[p] = 1 / 0;
            var v = i.get("precision");
            v >= 0 && "number" == typeof h && (h = +h.toFixed(Math.min(v, 20))), g.coord[f] = m.coord[f] = h, a = [g, m, {
                type: l,
                valueIndex: a.valueIndex,
                value: h
            }]
        }
        return a = [np(t, a[0]), np(t, a[1]), o({}, a[2])], a[2].type = a[2].type || "", r(a[2], a[0]), r(a[2], a[1]), a
    };
    aI.extend({
        type: "markLine", updateTransform: function (t, e, i) {
            e.eachSeries(function (t) {
                var e = t.markLineModel;
                if (e) {
                    var n = e.getData(), r = e.__from, a = e.__to;
                    r.each(function (e) {
                        Dp(r, e, !0, t, i), Dp(a, e, !1, t, i)
                    }), n.each(function (t) {
                        n.setItemLayout(t, [r.getItemLayout(t), a.getItemLayout(t)])
                    }), this.markerGroupMap.get(t.id).updateLayout()
                }
            }, this)
        }, renderSeries: function (t, e, i, n) {
            function r(e, i, r) {
                var a = e.getItemModel(i);
                Dp(e, i, r, t, n), e.setItemVisual(i, {
                    symbolRotate: a.get("symbolRotate"),
                    symbolSize: a.get("symbolSize") || g[r ? 0 : 1],
                    symbol: a.get("symbol", !0) || p[r ? 0 : 1],
                    color: a.get("itemStyle.color") || s.getVisual("color")
                })
            }

            var a = t.coordinateSystem, o = t.id, s = t.getData(), l = this.markerGroupMap,
                u = l.get(o) || l.set(o, new yp);
            this.group.add(u.group);
            var h = Ap(a, t, e), c = h.from, d = h.to, f = h.line;
            e.__from = c, e.__to = d, e.setData(f);
            var p = e.get("symbol"), g = e.get("symbolSize");
            _(p) || (p = [p, p]), "number" == typeof g && (g = [g, g]), h.from.each(function (t) {
                r(c, t, !0), r(d, t, !1)
            }), f.each(function (t) {
                var e = f.getItemModel(t).get("lineStyle.color");
                f.setItemVisual(t, {color: e || c.getItemVisual(t, "color")}), f.setItemLayout(t, [c.getItemLayout(t), d.getItemLayout(t)]), f.setItemVisual(t, {
                    fromSymbolRotate: c.getItemVisual(t, "symbolRotate"),
                    fromSymbolSize: c.getItemVisual(t, "symbolSize"),
                    fromSymbol: c.getItemVisual(t, "symbol"),
                    toSymbolRotate: d.getItemVisual(t, "symbolRotate"),
                    toSymbolSize: d.getItemVisual(t, "symbolSize"),
                    toSymbol: d.getItemVisual(t, "symbol")
                })
            }), u.updateData(f), h.line.eachItemGraphicEl(function (t) {
                t.traverse(function (t) {
                    t.dataModel = e
                })
            }), u.__keep = !0, u.group.silent = e.get("silent") || t.get("silent")
        }
    }), yu(function (t) {
        t.markLine = t.markLine || {}
    }), eI.extend({
        type: "markArea",
        defaultOption: {
            zlevel: 0,
            z: 1,
            tooltip: {trigger: "item"},
            animation: !1,
            label: {show: !0, position: "top"},
            itemStyle: {borderWidth: 0},
            emphasis: {label: {show: !0, position: "top"}}
        }
    });
    var fI = function (t, e, i, n) {
        var r = np(t, n[0]), o = np(t, n[1]), s = D, l = r.coord, u = o.coord;
        l[0] = s(l[0], -1 / 0), l[1] = s(l[1], -1 / 0), u[0] = s(u[0], 1 / 0), u[1] = s(u[1], 1 / 0);
        var h = a([{}, r, o]);
        return h.coord = [r.coord, o.coord], h.x0 = r.x, h.y0 = r.y, h.x1 = o.x, h.y1 = o.y, h
    }, pI = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]];
    aI.extend({
        type: "markArea", updateTransform: function (t, e, i) {
            e.eachSeries(function (t) {
                var e = t.markAreaModel;
                if (e) {
                    var n = e.getData();
                    n.each(function (e) {
                        var r = p(pI, function (r) {
                            return Op(n, e, r, t, i)
                        });
                        n.setItemLayout(e, r);
                        var a = n.getItemGraphicEl(e);
                        a.setShape("points", r)
                    })
                }
            }, this)
        }, renderSeries: function (t, e, i, n) {
            var r = t.coordinateSystem, a = t.id, o = t.getData(), l = this.markerGroupMap,
                u = l.get(a) || l.set(a, {group: new am});
            this.group.add(u.group), u.__keep = !0;
            var h = zp(r, t, e);
            e.setData(h), h.each(function (e) {
                var i = p(pI, function (i) {
                    return Op(h, e, i, t, n)
                }), a = !0;
                f(pI, function (t) {
                    if (a) {
                        var i = h.get(t[0], e), n = h.get(t[1], e);
                        (kp(i) || r.getAxis("x").containData(i)) && (kp(n) || r.getAxis("y").containData(n)) && (a = !1)
                    }
                }), h.setItemLayout(e, {points: i, allClipped: a}), h.setItemVisual(e, {color: o.getVisual("color")})
            }), h.diff(u.__data).add(function (t) {
                var e = h.getItemLayout(t);
                if (!e.allClipped) {
                    var i = new Dy({shape: {points: e.points}});
                    h.setItemGraphicEl(t, i), u.group.add(i)
                }
            }).update(function (t, i) {
                var n = u.__data.getItemGraphicEl(i), r = h.getItemLayout(t);
                r.allClipped ? n && u.group.remove(n) : (n ? Ja(n, {shape: {points: r.points}}, e, t) : n = new Dy({shape: {points: r.points}}), h.setItemGraphicEl(t, n), u.group.add(n))
            }).remove(function (t) {
                var e = u.__data.getItemGraphicEl(t);
                u.group.remove(e)
            }).execute(), h.eachItemGraphicEl(function (t, i) {
                var n = h.getItemModel(i), r = n.getModel("label"), a = n.getModel("emphasis.label"),
                    o = h.getItemVisual(i, "color");
                t.useStyle(s(n.getModel("itemStyle").getItemStyle(), {
                    fill: si(o, .4),
                    stroke: o
                })), t.hoverStyle = n.getModel("emphasis.itemStyle").getItemStyle(), Ga(t.style, t.hoverStyle, r, a, {
                    labelFetcher: e,
                    labelDataIndex: i,
                    defaultText: h.getName(i) || "",
                    isRectText: !0,
                    autoColor: o
                }), Na(t, {}), t.dataModel = e
            }), u.__data = h, u.group.silent = e.get("silent") || t.get("silent")
        }
    }), yu(function (t) {
        t.markArea = t.markArea || {}
    });
    var gI = function (t) {
        var e = t && t.timeline;
        _(e) || (e = e ? [e] : []), f(e, function (t) {
            t && Bp(t)
        })
    };
    Ax.registerSubTypeDefaulter("timeline", function () {
        return "slider"
    }), wu({type: "timelineChange", event: "timelineChanged", update: "prepareAndUpdate"}, function (t, e) {
        var i = e.getComponent("timeline");
        return i && null != t.currentIndex && (i.setCurrentIndex(t.currentIndex), !i.get("loop", !0) && i.isIndexMax() && i.setPlayState(!1)), e.resetOption("timeline"), s({currentIndex: i.option.currentIndex}, t)
    }), wu({type: "timelinePlayChange", event: "timelinePlayChanged", update: "update"}, function (t, e) {
        var i = e.getComponent("timeline");
        i && null != t.playState && i.setPlayState(t.playState)
    });
    var mI = Ax.extend({
        type: "timeline",
        layoutMode: "box",
        defaultOption: {
            zlevel: 0,
            z: 4,
            show: !0,
            axisType: "time",
            realtime: !0,
            left: "20%",
            top: null,
            right: "20%",
            bottom: 0,
            width: null,
            height: 40,
            padding: 5,
            controlPosition: "left",
            autoPlay: !1,
            rewind: !1,
            loop: !0,
            playInterval: 2e3,
            currentIndex: 0,
            itemStyle: {},
            label: {color: "#000"},
            data: []
        },
        init: function (t, e, i) {
            this._data, this._names, this.mergeDefaultAndTheme(t, i), this._initData()
        },
        mergeOption: function () {
            mI.superApply(this, "mergeOption", arguments), this._initData()
        },
        setCurrentIndex: function (t) {
            null == t && (t = this.option.currentIndex);
            var e = this._data.count();
            this.option.loop ? t = (t % e + e) % e : (t >= e && (t = e - 1), 0 > t && (t = 0)), this.option.currentIndex = t
        },
        getCurrentIndex: function () {
            return this.option.currentIndex
        },
        isIndexMax: function () {
            return this.getCurrentIndex() >= this._data.count() - 1
        },
        setPlayState: function (t) {
            this.option.autoPlay = !!t
        },
        getPlayState: function () {
            return !!this.option.autoPlay
        },
        _initData: function () {
            var t = this.option, e = t.data || [], i = t.axisType, r = this._names = [];
            if ("category" === i) {
                var a = [];
                f(e, function (t, e) {
                    var i, o = er(t);
                    S(t) ? (i = n(t), i.value = e) : i = e, a.push(i), b(o) || null != o && !isNaN(o) || (o = ""), r.push(o + "")
                }), e = a
            }
            var o = {category: "ordinal", time: "time"}[i] || "number",
                s = this._data = new Jw([{name: "value", type: o}], this);
            s.initData(e, r)
        },
        getData: function () {
            return this._data
        },
        getCategories: function () {
            return "category" === this.get("axisType") ? this._names.slice() : void 0
        }
    }), vI = mI.extend({
        type: "timeline.slider", defaultOption: {
            backgroundColor: "rgba(0,0,0,0)",
            borderColor: "#ccc",
            borderWidth: 0,
            orient: "horizontal",
            inverse: !1,
            tooltip: {trigger: "item"},
            symbol: "emptyCircle",
            symbolSize: 10,
            lineStyle: {show: !0, width: 2, color: "#304654"},
            label: {position: "auto", show: !0, interval: "auto", rotate: 0, color: "#304654"},
            itemStyle: {color: "#304654", borderWidth: 1},
            checkpointStyle: {
                symbol: "circle",
                symbolSize: 13,
                color: "#c23531",
                borderWidth: 5,
                borderColor: "rgba(194,53,49, 0.5)",
                animation: !0,
                animationDuration: 300,
                animationEasing: "quinticInOut"
            },
            controlStyle: {
                show: !0,
                showPlayBtn: !0,
                showPrevBtn: !0,
                showNextBtn: !0,
                itemSize: 22,
                itemGap: 12,
                position: "left",
                playIcon: "path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",
                stopIcon: "path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",
                nextIcon: "path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",
                prevIcon: "path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",
                color: "#304654",
                borderColor: "#304654",
                borderWidth: 1
            },
            emphasis: {
                label: {show: !0, color: "#c23531"},
                itemStyle: {color: "#c23531"},
                controlStyle: {color: "#c23531", borderColor: "#c23531", borderWidth: 2}
            },
            data: []
        }
    });
    c(vI, d_);
    var yI = v_.extend({type: "timeline"}), xI = function (t, e, i, n) {
        jb.call(this, t, e, i), this.type = n || "value", this.model = null
    };
    xI.prototype = {
        constructor: xI, getLabelModel: function () {
            return this.model.getModel("label")
        }, isHorizontal: function () {
            return "horizontal" === this.model.get("orient")
        }
    }, h(xI, jb);
    var _I = y, wI = f, bI = Math.PI;
    yI.extend({
        type: "timeline.slider", init: function (t, e) {
            this.api = e, this._axis, this._viewRect, this._timer, this._currentPointer, this._mainGroup, this._labelGroup
        }, render: function (t, e, i) {
            if (this.model = t, this.api = i, this.ecModel = e, this.group.removeAll(), t.get("show", !0)) {
                var n = this._layout(t, i), r = this._createGroup("mainGroup"), a = this._createGroup("labelGroup"),
                    o = this._axis = this._createAxis(n, t);
                t.formatTooltip = function (t) {
                    return Fo(o.scale.getLabel(t))
                }, wI(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function (e) {
                    this["_render" + e](n, r, o, t)
                }, this), this._renderAxisLabel(n, a, o, t), this._position(n, t)
            }
            this._doPlayStop()
        }, remove: function () {
            this._clearTimer(), this.group.removeAll()
        }, dispose: function () {
            this._clearTimer()
        }, _layout: function (t, e) {
            var i = t.get("label.position"), n = t.get("orient"), r = Rp(t, e);
            null == i || "auto" === i ? i = "horizontal" === n ? r.y + r.height / 2 < e.getHeight() / 2 ? "-" : "+" : r.x + r.width / 2 < e.getWidth() / 2 ? "+" : "-" : isNaN(i) && (i = {
                horizontal: {
                    top: "-",
                    bottom: "+"
                }, vertical: {left: "-", right: "+"}
            }[n][i]);
            var a = {horizontal: "center", vertical: i >= 0 || "+" === i ? "left" : "right"},
                o = {horizontal: i >= 0 || "+" === i ? "top" : "bottom", vertical: "middle"},
                s = {horizontal: 0, vertical: bI / 2}, l = "vertical" === n ? r.height : r.width,
                u = t.getModel("controlStyle"), h = u.get("show", !0), c = h ? u.get("itemSize") : 0,
                d = h ? u.get("itemGap") : 0, f = c + d, p = t.get("label.rotate") || 0;
            p = p * bI / 180;
            var g, m, v, y, x = u.get("position", !0), _ = h && u.get("showPlayBtn", !0),
                w = h && u.get("showPrevBtn", !0), b = h && u.get("showNextBtn", !0), S = 0, M = l;
            return "left" === x || "bottom" === x ? (_ && (g = [0, 0], S += f), w && (m = [S, 0], S += f), b && (v = [M - c, 0], M -= f)) : (_ && (g = [M - c, 0], M -= f), w && (m = [0, 0], S += f), b && (v = [M - c, 0], M -= f)), y = [S, M], t.get("inverse") && y.reverse(), {
                viewRect: r,
                mainLength: l,
                orient: n,
                rotation: s[n],
                labelRotation: p,
                labelPosOpt: i,
                labelAlign: t.get("label.align") || a[n],
                labelBaseline: t.get("label.verticalAlign") || t.get("label.baseline") || o[n],
                playPosition: g,
                prevBtnPosition: m,
                nextBtnPosition: v,
                axisExtent: y,
                controlSize: c,
                controlGap: d
            }
        }, _position: function (t) {
            function e(t) {
                var e = t.position;
                t.origin = [h[0][0] - e[0], h[1][0] - e[1]]
            }

            function i(t) {
                return [[t.x, t.x + t.width], [t.y, t.y + t.height]]
            }

            function n(t, e, i, n, r) {
                t[n] += i[n][r] - e[n][r]
            }

            var r = this._mainGroup, a = this._labelGroup, o = t.viewRect;
            if ("vertical" === t.orient) {
                var s = Le(), l = o.x, u = o.y + o.height;
                Ee(s, s, [-l, -u]), Ne(s, s, -bI / 2), Ee(s, s, [l, u]), o = o.clone(), o.applyTransform(s)
            }
            var h = i(o), c = i(r.getBoundingRect()), d = i(a.getBoundingRect()), f = r.position, p = a.position;
            p[0] = f[0] = h[0][0];
            var g = t.labelPosOpt;
            if (isNaN(g)) {
                var m = "+" === g ? 0 : 1;
                n(f, c, h, 1, m), n(p, d, h, 1, 1 - m)
            } else {
                var m = g >= 0 ? 0 : 1;
                n(f, c, h, 1, m), p[1] = f[1] + g
            }
            r.attr("position", f), a.attr("position", p), r.rotation = a.rotation = t.rotation, e(r), e(a)
        }, _createAxis: function (t, e) {
            var i = e.getData(), n = e.get("axisType"), r = Nh(e, n);
            r.getTicks = function () {
                return i.mapArray(["value"], function (t) {
                    return t
                })
            };
            var a = i.getDataExtent("value");
            r.setExtent(a[0], a[1]), r.niceTicks();
            var o = new xI("value", r, t.axisExtent, n);
            return o.model = e, o
        }, _createGroup: function (t) {
            var e = this["_" + t] = new am;
            return this.group.add(e), e
        }, _renderAxisLine: function (t, e, i, n) {
            var r = i.getExtent();
            n.get("lineStyle.show") && e.add(new zy({
                shape: {x1: r[0], y1: 0, x2: r[1], y2: 0},
                style: o({lineCap: "round"}, n.getModel("lineStyle").getLineStyle()),
                silent: !0,
                z2: 1
            }))
        }, _renderAxisTick: function (t, e, i, n) {
            var r = n.getData(), a = i.scale.getTicks();
            wI(a, function (t) {
                var a = i.dataToCoord(t), o = r.getItemModel(t), s = o.getModel("itemStyle"),
                    l = o.getModel("emphasis.itemStyle"),
                    u = {position: [a, 0], onclick: _I(this._changeTimeline, this, t)}, h = Vp(o, s, e, u);
                Na(h, l.getItemStyle()), o.get("tooltip") ? (h.dataIndex = t, h.dataModel = n) : h.dataIndex = h.dataModel = null
            }, this)
        }, _renderAxisLabel: function (t, e, i, n) {
            var r = i.getLabelModel();
            if (r.get("show")) {
                var a = n.getData(), o = i.getViewLabels();
                wI(o, function (n) {
                    var r = n.tickValue, o = a.getItemModel(r), s = o.getModel("label"),
                        l = o.getModel("emphasis.label"), u = i.dataToCoord(n.tickValue), h = new _y({
                            position: [u, 0],
                            rotation: t.labelRotation - t.rotation,
                            onclick: _I(this._changeTimeline, this, r),
                            silent: !1
                        });
                    Wa(h.style, s, {
                        text: n.formattedLabel,
                        textAlign: t.labelAlign,
                        textVerticalAlign: t.labelBaseline
                    }), e.add(h), Na(h, Wa({}, l))
                }, this)
            }
        }, _renderControl: function (t, e, i, n) {
            function r(t, i, r, h) {
                if (t) {
                    var c = {
                        position: t,
                        origin: [a / 2, 0],
                        rotation: h ? -o : 0,
                        rectHover: !0,
                        style: s,
                        onclick: r
                    }, d = Fp(n, i, u, c);
                    e.add(d), Na(d, l)
                }
            }

            var a = t.controlSize, o = t.rotation, s = n.getModel("controlStyle").getItemStyle(),
                l = n.getModel("emphasis.controlStyle").getItemStyle(), u = [0, -a / 2, a, a], h = n.getPlayState(),
                c = n.get("inverse", !0);
            r(t.nextBtnPosition, "controlStyle.nextIcon", _I(this._changeTimeline, this, c ? "-" : "+")), r(t.prevBtnPosition, "controlStyle.prevIcon", _I(this._changeTimeline, this, c ? "+" : "-")), r(t.playPosition, "controlStyle." + (h ? "stopIcon" : "playIcon"), _I(this._handlePlayClick, this, !h), !0)
        }, _renderCurrentPointer: function (t, e, i, n) {
            var r = n.getData(), a = n.getCurrentIndex(), o = r.getItemModel(a).getModel("checkpointStyle"), s = this,
                l = {
                    onCreate: function (t) {
                        t.draggable = !0, t.drift = _I(s._handlePointerDrag, s), t.ondragend = _I(s._handlePointerDragend, s), Gp(t, a, i, n, !0)
                    }, onUpdate: function (t) {
                        Gp(t, a, i, n)
                    }
                };
            this._currentPointer = Vp(o, o, this._mainGroup, {}, this._currentPointer, l)
        }, _handlePlayClick: function (t) {
            this._clearTimer(), this.api.dispatchAction({type: "timelinePlayChange", playState: t, from: this.uid})
        }, _handlePointerDrag: function (t, e, i) {
            this._clearTimer(), this._pointerChangeTimeline([i.offsetX, i.offsetY])
        }, _handlePointerDragend: function (t) {
            this._pointerChangeTimeline([t.offsetX, t.offsetY], !0)
        }, _pointerChangeTimeline: function (t, e) {
            var i = this._toAxisCoord(t)[0], n = this._axis, r = So(n.getExtent().slice());
            i > r[1] && (i = r[1]), i < r[0] && (i = r[0]), this._currentPointer.position[0] = i, this._currentPointer.dirty();
            var a = this._findNearestTick(i), o = this.model;
            (e || a !== o.getCurrentIndex() && o.get("realtime")) && this._changeTimeline(a)
        }, _doPlayStop: function () {
            function t() {
                var t = this.model;
                this._changeTimeline(t.getCurrentIndex() + (t.get("rewind", !0) ? -1 : 1))
            }

            this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(_I(t, this), this.model.get("playInterval")))
        }, _toAxisCoord: function (t) {
            var e = this._mainGroup.getLocalTransform();
            return io(t, e, !0)
        }, _findNearestTick: function (t) {
            var e, i = this.model.getData(), n = 1 / 0, r = this._axis;
            return i.each(["value"], function (i, a) {
                var o = r.dataToCoord(i), s = Math.abs(o - t);
                n > s && (n = s, e = a)
            }), e
        }, _clearTimer: function () {
            this._timer && (clearTimeout(this._timer), this._timer = null)
        }, _changeTimeline: function (t) {
            var e = this.model.getCurrentIndex();
            "+" === t ? t = e + 1 : "-" === t && (t = e - 1), this.api.dispatchAction({
                type: "timelineChange",
                currentIndex: t,
                from: this.uid
            })
        }
    }), yu(gI), t.version = ow, t.dependencies = sw, t.PRIORITY = _w, t.init = cu, t.connect = du, t.disConnect = fu, t.disconnect = Vw, t.dispose = pu, t.getInstanceByDom = gu, t.getInstanceById = mu, t.registerTheme = vu, t.registerPreprocessor = yu, t.registerProcessor = xu, t.registerPostUpdate = _u, t.registerAction = wu, t.registerCoordinateSystem = bu, t.getCoordinateSystemDimensions = Su, t.registerLayout = Mu, t.registerVisual = Iu, t.registerLoading = Tu, t.extendComponentModel = Du, t.extendComponentView = Au, t.extendSeriesModel = ku, t.extendChartView = Pu, t.setCanvasCreator = Lu, t.registerMap = Ou, t.getMap = zu, t.dataTool = Gw, t.zrender = nv, t.number = px, t.format = bx, t.throttle = gl, t.helper = Wb, t.matrix = Tg, t.vector = cg, t.color = Yg, t.parseGeoJSON = Ub, t.parseGeoJson = Zb, t.util = Kb, t.graphic = $b, t.List = Jw, t.Model = fo, t.Axis = jb, t.env = Up
});